text:
Q: Recyclerview Shows Empty After JSON Parsing I have to display a list of items on recyclerview from a remote network call. I have initialized the recyclerview and set it's layout manager and adapter properly but the list doesn't show.
Here's my adapter class:
public class DashboardAdapter extends RecyclerView.Adapter<HomeDashboardHolder> {

private final Context context;
private List<HomeDashboard> itemsList;

public DashboardAdapter(Context context, List<HomeDashboard> itemsList) {
    this.context = context;
    this.itemsList = itemsList;
}

@Override
public HomeDashboardHolder onCreateViewHolder(ViewGroup parent, int viewType) {
    View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.home_dashboard_items_layout, parent, false);
    return new HomeDashboardHolder(view);
}

@Override
public void onBindViewHolder(HomeDashboardHolder viewholder, int position) {
    HomeDashboard dashboard = itemsList.get(position);
    viewholder.dashTitle.setText(dashboard.getDashTitle());
    Picasso.with(context)
            .load(dashboard.getDashIcon())
            .placeholder(R.drawable.noimage)
            .into(viewholder.dashIcon);
}

@Override
public int getItemCount() {
    if (itemsList == null) {
        return 0;
    }
    return itemsList.size();
 }
}

Here's my activity code so far:
public class HomeActivity extends AppCompatActivity {

private static final String TAG = HomeActivity.class.getSimpleName();

private Toolbar toolbar;
private SwipeRefreshLayout swipeRefresh;
private RecyclerView dashboardRV, recyclerDrawer;
private DrawerLayout drawerLayout;

private List<DrawerItems> itemsList = new ArrayList<>();
private List<HomeDashboard> dashboardsList = new ArrayList<>();

private RecyclerView.LayoutManager layoutManager;
private RecyclerDrawerAdapter drawerAdapter;
private DashboardAdapter dashboardAdapter;
private String slug;
private int cartLength;

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_home);

    init();
    setSupportActionBar(toolbar);

    initDrawer();

    setUpDashboard();

}

private void initDrawer() {
    recyclerDrawer.setHasFixedSize(true);
    recyclerDrawer.setLayoutManager(new LinearLayoutManager(this));

    DrawerItems drawerItems = new DrawerItems("Products", R.drawable.basket);
    itemsList.add(drawerItems);

    DrawerItems drawerItems1 = new DrawerItems("Cart", R.drawable.cart);
    itemsList.add(drawerItems1);

    DrawerItems drawerItems2 = new DrawerItems("Checkout", R.drawable.check_out);
    itemsList.add(drawerItems2);

    DrawerItems drawerItems3 = new DrawerItems("Profile", R.drawable.profile);
    itemsList.add(drawerItems3);

    DrawerItems drawerItems4 = new DrawerItems("Info", R.drawable.info);
    itemsList.add(drawerItems4);

    DrawerItems drawerItems5 = new DrawerItems("About", R.drawable.about);
    itemsList.add(drawerItems5);

    drawerAdapter = new RecyclerDrawerAdapter(this, itemsList);
    recyclerDrawer.setAdapter(drawerAdapter);

    toolbar.setNavigationIcon(R.drawable.burger_menu);
    toolbar.setNavigationOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            if (drawerLayout.isDrawerOpen(GravityCompat.START)) {
                drawerLayout.closeDrawer(GravityCompat.START);
            } else {
                drawerLayout.openDrawer(GravityCompat.START);
            }
        }
    });

    setDrawerClickListener();

}

private void setDrawerClickListener() {
    recyclerDrawer.addOnItemTouchListener(new RecyclerItemTouchListener(this, recyclerDrawer, new RecyclerClickListener() {
        @Override
        public void onClick(View view, int position) {
            switch (position) {
                case 0:
                    startActivity(new Intent(HomeActivity.this, AllProductsActivity.class));
                    drawerLayout.closeDrawer(GravityCompat.START);
                    break;
                case 1:
                    startActivity(new Intent(HomeActivity.this, CartActivity.class));
                    drawerLayout.closeDrawer(GravityCompat.START);
                    break;
                case 2:
                    Intent intent = new Intent(HomeActivity.this, CheckOutActivity.class);
                    startActivity(intent);
                    drawerLayout.closeDrawer(GravityCompat.START);
                    break;
                case 3:
                    startActivity(new Intent(HomeActivity.this, ProfileActivity.class));
                    drawerLayout.closeDrawer(GravityCompat.START);
                    break;
                case 4:
                    Log.d(TAG, "Info Clicked");
                    break;
                case 5:
                    startActivity(new Intent(HomeActivity.this, AboutActivity.class));
                    drawerLayout.closeDrawer(GravityCompat.START);
                    break;
            }
        }

        @Override
        public void onLongClick(View view, int position) {

        }
    }));

}

private void init() {
    swipeRefresh = findViewById(R.id.swipeRefresh);
    toolbar = findViewById(R.id.toolbar);
    dashboardRV = findViewById(R.id.dashboardRV);
    recyclerDrawer = findViewById(R.id.recyclerDrawer);
    drawerLayout = findViewById(R.id.drawerLayout);
}

private void setUpDashboard() {

    dashboardRV.setHasFixedSize(true);
    layoutManager = new GridLayoutManager(HomeActivity.this, 2, GridLayoutManager.VERTICAL, false);
    dashboardRV.setLayoutManager(layoutManager);

    getHomeDash();

}

public void getHomeDash() {
    AndroidNetworking.get(Constants.CATEGORIES_ENDPOINT)
            .setTag("Get Categories Dashboard")
            .setPriority(Priority.HIGH)
            .build()
            .getAsJSONObject(new JSONObjectRequestListener() {
                @Override
                public void onResponse(JSONObject response) {
                    Log.d(TAG, "Categories Response:\t" + response.toString());

                    try {
                        JSONObject jsonObject = new JSONObject(response.toString());
                        final JSONArray categories = jsonObject.getJSONArray("categories");

                        for (int i = 0; i < categories.length(); i++) {
                            JSONObject object = categories.getJSONObject(i);

                            String id = object.getString("_id");
                            String title = object.getString("title");
                            String image = object.getString("image");
                            slug = object.getString("slug");

                            HomeDashboard dashboard = new HomeDashboard();
                            dashboard.setDashIcon(image);
                            dashboard.setDashTitle(title);
                            dashboard.setId(id);

                            dashboardsList.add(dashboard);

                        }
                        dashboardAdapter = new DashboardAdapter(getApplicationContext(), dashboardsList);
                        dashboardRV.setAdapter(dashboardAdapter);
                    } catch (JSONException e) {
                        e.printStackTrace();
                    }

                    dashboardAdapter.notifyDataSetChanged();

                }

                @Override
                public void onError(ANError anError) {
                    Log.d(TAG, "Request Failed:\t" + anError.getMessage());
                }
            });
}

@Override
public boolean onCreateOptionsMenu(Menu menu) {
    getMenuInflater().inflate(R.menu.app_menu, menu);
    return super.onCreateOptionsMenu(menu);
}

@Override
public boolean onOptionsItemSelected(MenuItem item) {
    switch (item.getItemId()) {
        case R.id.action_view_cart:
            startActivity(new Intent(HomeActivity.this, CartActivity.class));
    }
    return true;
}

@Override
protected void onResume() {
    super.onResume();

    if (drawerLayout.isDrawerOpen(GravityCompat.START)) {
        drawerLayout.closeDrawer(GravityCompat.START);
    }

}

}

Here's my sample json response for this activity:
D/HomeActivity: Categories Response:    {"success":true,"message":"All Categories","categories":[{"_id":"5aac46d8644ac63f14ffe89b","title":"Shrti","slug":"shrti","image":"http:\/\/res.cloudinary.com\/aapni-dukan\/image\/upload\/v1521239768\/categoryImages\/eBeSBYrG7MP7rW2Sa4qqQd06_lwakio.png"},{"_id":"5aac5b01d224ac3b801b9967","title":"Fruits","slug":"fruits","image":"http:\/\/res.cloudinary.com\/aapni-dukan\/image\/upload\/v1521244929\/categoryImages\/uWQT1XEplligclP4PrNC-Zyf_eamj8u.jpg"}]}

I am initializing and setting the adapter inside the getHomeDash(). I have also called notifyDataSetChanged() but nothing shows.
In the log, to check if the list is empty, I am getting the size as 2 but not able to show any items. I have also tried setting the adapter in onCreate() just after the call to getHomeDash() but still nothing is displayed on the screen.
Viewholder class:
public class HomeDashboardHolder extends RecyclerView.ViewHolder {

public ImageView dashIcon;
public TextView dashTitle;

public HomeDashboardHolder(View itemView) {
    super(itemView);

    dashIcon = itemView.findViewById(R.id.dashIcon);
    dashTitle = itemView.findViewById(R.id.dashTitle);

}
}

Can someone help me out with this pls? Thanks

A: I think you are operating your UI ( notifyDataSetChanged() ) in a working thread in getHomeDash() JSONObjectRequestListener function.You should invoke this function in a main thread,and check the layout_height and layout_width in XML.

A: make change for recycler view layoutmanger set used below code..
 dashboardRV.setLayoutManager(new GridLayoutManager(this, numberOfColumns,false));

A: You are calling dashboardAdapter.notifyDataSetChanged(); after creating new object of DashboardAdapter class
notifyDataSetChanged(); is used when there is some changes your list adapter
User this
layoutManager = new GridLayoutManager(HomeActivity.this,2);

Instead of this
layoutManager = new GridLayoutManager(HomeActivity.this, 2, GridLayoutManager.VERTICAL, false);


text:
Q: Using Platform-Specific packages in Flutter I'm not sure if this is the appropriate stack exchange site but I think it fits more of here than the others that I can think of. Anyways, I work for a mobile app development team and we're looking into using Flutter to develop our future mobile apps as it reduces the amount of work needed when developing for both iOS and Android (we're just a small team).
I read through a bit about Flutter and checked the available packages and the Dart/Flutter Pub and there are some packages that aren't available yet for Flutter that we use for Android and iOS. Take MSAL (Microsoft Authentication Library) for example. After reading through the documentation, I read about Platform Channels and how you can run some KT/Swift etc specific code and return it through something like the MethodChannel in Kotlin but the example from the Flutter docs show an example of only returning specific data types or simple values. What if I wanted to authenticate a user using MSAL? that would involve some UI work that doesn't happen in Flutter specifically since it relies on either the browser or a webview (depending on your MSAL config)
My question here is probably gonna be in 2 main things:

*

*If you have a package that kind of relies on the UI of either iOS or Android for something that isn't gonna take up the entirety of your app's functions, how would it be possible to still use Flutter to develop the rest of your apps while still making use of the platform-specific packages?

*Is it possible to have like more than 1 Activity or ViewController that does this and then go to the Flutter part afterwards? Cuz I think thats one possible solution to the previous question.

Note:
I'm aware that there are packages for authentication in the Dart Pub but I'm just using MSAL as an example, we also use other packages that kind of rely on displaying custom views to authenticate users.

A: I got this to work using platform channels. To answer my specific questions:

*

*This can still be handled by platform channels. As an example, I am using MSAL with a webview and it still returns to the original FlutterActivity after authenticating my user.

*I am not 100% sure about this because I didn't create an Activity myself but the package was able to open its own webview so it should work

MainActivity
private val LOGIN_CHANNEL = "flutter.android/msal"
private val scopes = arrayOf("https://graph.microsoft.com/User.Read", "https://graph.microsoft.com/User.ReadBasic.All")

override fun onCreate(savedInstanceState: Bundle?) {
    super.onCreate(savedInstanceState)
    GeneratedPluginRegistrant.registerWith(this)
    MyLibrary.setupClientApp(applicationContext, R.raw.auth_config, scopes)
    MethodChannel(flutterView, LOGIN_CHANNEL).setMethodCallHandler { call, result ->
        if (call.method == "login") {
            login{
                result.success(it)
            }
        }
    }
}

private fun login(callback: (String?) -> Unit) {
    MyLibrary.instance!!.acquireToken(
            this,
            scopes,
            MyLibrary.getAuthInteractiveCallback {
                callback(MyLibrary.getUser()?.displayName)
            }
    )
}

MyHomePage (State)
class _MyHomePageState extends State<MyHomePage> {
  String _responseFromNativeCode = "";
  static const platform = const MethodChannel('flutter.android/msal');

  Future _login() async {
    String response = "";
      try {
        response = await platform.invokeMethod('login');
      } on PlatformException catch (e) {
        response = "Failed to Invoke: '${e.message}'.";
      }
      setState(() {
        _responseFromNativeCode = response;
      });
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            Text(
              'You have pushed the button this many times:',
            ),
            Text(
              'Hi $_responseFromNativeCode',
              style: Theme.of(context).textTheme.display1,
            ),
          ],
        ),
      ),
      floatingActionButton: FloatingActionButton(
        onPressed: _login,
        tooltip: 'Login',
        child: Icon(Icons.lock),
      ),
    );
  }
}

redpajama_set_name: RedPajamaStackExchange


text:
Q: Popup Lost the Focus on Navigation in WPF While using the List View or List Box inside the Popup its behavior looks abnormal on the navigation operation. We have the design as like, loaded the list view inside popup control. On navigate the list view using navigation keys after reaching the last item of the list view, that the actual parent of the popup control starts navigating for my action how to avoid this navigation. In the below code after reaching the List Box last Item the Grid catch the focus and start scrolling.
 <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <ToggleButton Height="20" Width="20"
                        x:Name="PART_ColorPickerToggleButton"
                        HorizontalAlignment="Stretch"
                        VerticalAlignment="Stretch"
                        IsTabStop="True">
                <ToggleButton.Template>
                    <ControlTemplate>
                        <Border BorderBrush="LightGray" BorderThickness="1">
                            <Rectangle
                                        x:Name="PART_Rectangle"
                                        HorizontalAlignment="Stretch"
                                        VerticalAlignment="Stretch"
                                        Fill="Orange" />
                        </Border>
                    </ControlTemplate>
                </ToggleButton.Template>
            </ToggleButton>
            <Popup Opened="PART_ColorPickerPalettePopup_Opened"
                   Height="100"
                   Closed="PART_ColorPickerPalettePopup_Closed"
                        x:Name="PART_ColorPickerPalettePopup"
                        PlacementTarget="{Binding ElementName=PART_ColorPickerToggleButton}"
                        Width="250"
                        VerticalAlignment="Bottom"
                        AllowsTransparency="False"
                        Focusable="True"
                        HorizontalOffset="1"
                        IsOpen="{Binding ElementName=PART_ColorPickerToggleButton, Path=IsChecked, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                        PopupAnimation="Slide"
                        StaysOpen="False"
                        VerticalOffset="1">
                <ListBox x:Name="list" PreviewKeyDown="list_PreviewKeyDown">
                </ListBox>
            </Popup>
            <CheckBox Content="HI" Grid.Row="1" Height="25"/>
            <CheckBox Content="HI" Grid.Row="2" Height="25"/>
            <CheckBox Content="HI" Grid.Row="3" Height="25"/>
            <CheckBox Content="HI" Grid.Row="4" Height="25"/>
            <CheckBox Content="HI" Grid.Row="5" Height="25"/>
            <CheckBox Content="HI" Grid.Row="6" Height="25"/>
            <CheckBox Content="HI" Grid.Row="7" Height="25"/>
            <CheckBox Content="HI" Grid.Row="8" Height="25"/>
            <CheckBox Content="HI" Grid.Row="9" Height="25"/>
            <CheckBox Content="HI" Grid.Row="10" Height="25"/>
            <CheckBox Content="HI" Grid.Row="11" Height="25"/>
            <CheckBox Content="HI" Grid.Row="12" Height="25"/>
            <CheckBox Content="HI" Grid.Row="13" Height="25"/>
            <CheckBox Content="HI" Grid.Row="14" Height="25"/>
            <CheckBox Content="HI" Grid.Row="15" Height="25"/>
        </Grid>

A: You should apply the attached property KeyboardNavigation.DirectionalNavigation to the ListBox and set it to KeyboardNavigationMode.Cycle:
<ListBox ItemsSource="{Binding Values}"
         KeyboardNavigation.DirectionalNavigation="Cycle" />


text:
Q: angular.js passing function into an object I think it may be useful if I show the wider scope :) below is my html:

Balkans

Key factor here is the {{record.className()}} binding which depending on its value determines the behaviour of the record, whether it gets a proper styling or not. as you can see it is a reference to a function. And here is the JS:
var antroApp = angular.module('antroApp', []);
$scope.records = [
    {id:0,
    className: $scope.probieren,
    recordName:$scope.alpeic.length

    },
    {id:1,
    className: $scope.probieren,
    recordName:$scope.alpeic.length

    }

    ];

$scope.probieren = function(){
    if($scope.records.recordName > 10){
        $scope.records.className == 'special'
    }
    else{
        $scope.records.className == 'normal'
    }
}
}
antroApp.controller('dialogWindows', dialogWindows);

When I set up the className statically ("special" or "normal") it renders perfectly
but when it comes to a function, it all just gets stuck. really feel helpless about this. any tips appreciated.

A: You've set it up fine except they have to be defined in the other order, but in your dom when you use it call a function like this:

{{ record.recordName }}

There's a few more issues with how you're referencing $scope.records.className instead of some index of the array for records but my answer should answer the specific question you have.


text:
Q: Unable to simultaneously satisfy constraints. Leading and Trailing constraints conflicts Can somebody help me understand these errors and and suggest how to go about solving them?
2014-09-19 08:52:45.812 Zazzle[23292:1834589] Unable to simultaneously satisfy constraints.
    Probably at least one of the constraints in the following list is one you don't want. Try this: (1) look at each constraint and try to figure out which you don't expect; (2) find the code that added the unwanted constraint or constraints and fix it. (Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints)

(
    "<NSLayoutConstraint:0x7c0ba1e0 H:|-(8)-[UIView:0x7c0bb900]   (Names: '|':UIView:0x7c0b6c20 )>",
    "<NSLayoutConstraint:0x7c0ba210 H:[UIView:0x7c0bb900]-(8)-|   (Names: '|':UIView:0x7c0b6c20 )>",
    "<NSLayoutConstraint:0x7c0942e0 UIView:0x7c0b6c20.left == UIView:0x7c0bbfa0.left>",
    "<NSLayoutConstraint:0x7c0c03e0 UIView:0x7c0b6c20.right == UIView:0x7c0bbfa0.right>",
    "<NSLayoutConstraint:0x7c635250 'UIView-Encapsulated-Layout-Width' H:[UIView:0x7c0bbfa0(2)]>"
)

Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x7c0ba210 H:[UIView:0x7c0bb900]-(8)-|   (Names: '|':UIView:0x7c0b6c20 )>

A: fromFollow the below steps

*

*Check the constraints of a UiObject and remove any constraints that duplicated, from size inspector of Xcode.

*If there is no duplication,find out exact constraint that cause the problem

*Try to change the priority of constraint from default required(1000) to high(750).

A: The conflict is right there: the first two constraints set the subview's leading and trailing values to be 8 pixels away from the containing view controller's left and right edges, while the third and fourth lines set them to be exactly even with the containing view's edges. Remove one pair or the other, or, as @dasdom said, lower the priorities of one of the constraint pairs.


text:
Q: React useContext rerender component I am trying to use useContext hook instead of Redux in my app. Both Header component and Login page are using same context. Both are children of Routing component which is using context provider. In sign up form I am using hard coded data to check the functionality. The header is not rerendering after the sign up.
App.js (login component)
import React, { useContext, useState } from "react";
import { ExamContext } from "./Context/ExamContext";

function App() {
  const [user, setUser] = useState("");
  const [pass, setPass] = useState("");

  const { role, login } = useContext(ExamContext);

  const handleSubmit = () => {
    login(user, "Admin");
  };

  return (
    <React.Fragment>

Login Forms

                Email
                <input
                  type="text"
                  className="form-control"
                  value={user}
                  onChange={e => setUser(e.target.value)}
                />

                Password
                <input
                  type="password"
                  className="form-control"
                  value={pass}
                  onChange={e => setPass(e.target.value)}
                />

            <button className="btn btn-success" onClick={handleSubmit}>
              Submit
            </button>

    </React.Fragment>
  );
}

export default App;

The Header component
const Header = () => {
  const { role } = useContext(ExamContext);

  const [user] = useState(role);

  switch (user) {
    case "Admin":
      return (

Admin

      );
    case "User":
      return (

User

      );
    default:
      return (

No User

      );
  }
};
export default Header;

and The Context
import React, { createContext, useState } from "react";

const ExamContext = createContext();

const ExamConProvider = ({ children }) => {
  const [user, setUser] = useState("");
  const [role, setRole] = useState("NoUser");

  const login = (getuser, getrole) => {
    setRole(getrole);
    setUser(getuser);
  };

  return (
    <ExamContext.Provider value={{ user, role, login }}>
      {children}
    </ExamContext.Provider>
  );
};

export { ExamContext, ExamConProvider };

Index.js
import React from 'react';
import ReactDOM from 'react-dom';
import Routing from './components/Routing';
import { ExamConProvider } from './Context/ExamContext'
import './scss/style.scss';

ReactDOM.render(
    <ExamConProvider>
        <Routing />
    </ExamConProvider>
    ,document.getElementById("root"))

Routing Module
import React from 'react';
import { BrowserRouter, Route } from 'react-router-dom';
import App from '../App';
import Home from '../containers/Home';
import Header from '../components/Header';
import Footer from '../components/Footer';

const Routing = () => {
    return(
        <BrowserRouter>

            <Route exact path="/" component={App}></Route>
            <Route path="/home" component={Home}></Route>

        </BrowserRouter>
    )
}

export default Routing;

A: not sure if you are asking why the header is not re-rendering. If yes, the reason is because you didn't add the Context Provider into the <App />.
You should add it like below:
import React, { useContext, useState } from 'react';
import { ExamConProvider, ExamContext } from './Context/ExamContext';
// Remember to import ExamConProvider at above line

function App() {

    // ... blah blah blah

    return(
        <ExamConProvider> {/* <--- Add this */}
            <React.Fragment>
                {/* Blah blah blah */}
            </React.Fragment>
        </ExamConProvider> {/* <--- Add this */}
    );
}

export default App;

Cheers!

A: You should try use the setUser and setRole state on your login component instead of using a function of the context.
In the login component try this:
    function App() {
      // renamed the input state
      const [userInput, setUserInput] = useState("");
      const [passInput, setPassInput] = useState("");

      const { role, setUser, setRole } = useContext(ExamContext);

      const handleSubmit = () => {
          // setting the context state on Login component
          setUser(userInput);
          setRole("Admin");
      };


text:
Q: SQL to count number for each value I have a SQL query and I want to be able to count the total number of priorities which has values set to low, medium, high or unspecified.
Currently it counts to a maximum of 13 rows, i'd expect there to be multiple columns with counts such as... 2, 4, 0
Code:
 SELECT c.Name, COUNT(*) as Count_By_Priority,
 CASE WHEN cb.Priority = 0 THEN "Unspecified" WHEN cb.Priority = 1 THEN "Low" WHEN cb.Priority = 2 THEN "Medium" WHEN cb.Priority = 3 THEN "High" END as PriorityNumber
 FROM TABLE 1 cb
 LEFT JOIN Co c ON c.Id = cb.Id
 WHERE c.Name LIKE %Name%"
 GROUP BY c.Id;

It seems to print "Unspecified" for the priority keys when I would be expecting low or alternatives.

A: I am pretty sure that you can just change your group by clause to group by c.Id, then PriorityNumber:
SELECT
    c.Name,
    COUNT(*) as Count_By_Priority,
    CASE
        WHEN cb.Priority = 0 THEN "Unspecified"
        WHEN cb.Priority = 1 THEN "Low"
        WHEN cb.Priority = 2 THEN "Medium"
        WHEN cb.Priority = 3 THEN "High"
    END as PriorityNumber
FROM TABLE 1 cb
LEFT JOIN Co c
ON c.Id = cb.Id
WHERE c.Name LIKE %Name%"
GROUP BY c.Id, PriorityNumber;

A: Try this,
SELECT c.Name, COUNT(*) as Count_By_Priority,
CASE WHEN cb.Priority = 0 THEN "Unspecified"
WHEN cb.Priority = 1 THEN "Low"
WHEN cb.Priority = 2 THEN "Medium"
WHEN cb.Priority = 3 THEN "High" END as PriorityNumber

FROM TABLE 1 cb LEFT JOIN Co c ON c.Id = cb.Id

WHERE c.Name LIKE %Name%"

GROUP BY c.Name,PriorityNumber ;

A: You are using aggregation, but your SELECT is inconsistent with your GROUP BY.  I think you intend something like:
SELECT c.Name, COUNT(*) as Count_By_Priority,
       (CASE WHEN MAX(cb.Priority) = 0 THEN 'Unspecified'
             WHEN MAX(cb.Priority) = 1 THEN 'Low'
             WHEN MAX(cb.Priority) = 2 THEN 'Medium'
             WHEN MAX(cb.Priority) = 3 THEN 'High'
        END) as PriorityNumber
FROM TABLE 1 cb LEFT JOIN
     Co c
     ON c.Id = cb.Id
WHERE c.Name LIKE '%Name%'
GROUP BY c.Id;

I'm not sure if you want MAX() or MIN() but MAX() makes sense to me.

A: If you want a count of each priority in a separate column use conditional aggregation.
SELECT c.Name,
 sum(CASE WHEN cb.Priority = 0 THEN 1 else 0 end) as "Unspecified"
 sum(case WHEN cb.Priority = 1 THEN 1 else 0 end) as "Low"
 sum(case WHEN cb.Priority = 2 THEN 1 else 0 end) as "Medium"
 sum(case WHEN cb.Priority = 3 THEN 1 else 0 end) as "High"
 FROM TABLE 1 cb
 LEFT JOIN Co c ON c.Id = cb.Id
 WHERE c.Name LIKE %Name%"
 GROUP BY c.name;


text:
Q: Powershell get filename of killed process I have a line of Powershell code that kills a process that has been running for more then 30 minutes (Excel). How can I also get the filename of the killed process?
Get-Process excel |
    Where { $_.StartTime -lt (Get-Date).AddMinutes(-30) } |
    Stop-Process -Force

A: This works for me but it might not be as you need it:
$filename = get-process excel | where-object { $_.StartTime -lt (Get-Date).AddMinutes(-1) } | select-object mainwindowtitle
write-host $filename
get-process excel | where-object { $_.StartTime -lt (Get-Date).AddMinutes(-1) } | stop-process -force

This outputs something on the line of: @{MainWindowTitle=Microsoft Excel - testdata.xlsx]}
You may want to append everything to a log so add something like | out-file c:\testlog.txt at the end of $filename.
Might be also good to get a timestamp.
Edit: unfortunately this closes all excel files opened
Edit2: I've experimented a bit thanks to Seth's comment and i got this to work:
Get-Process excel | Where-Object {$_.StartTime -lt (Get-Date).AddMinutes(-30)} | ForEach-Object {
    echo $_.Id, $_.MainWindowTitle;
    Stop-Process -Force -Id $_.id
}

It outputs to the window what it closes like this:
72148
Microsoft Excel - Book1
73712
Microsoft Excel - Book2

A: Try this below command,
c:\> powershell -command "get-Process | where-Object {$_.mainWindowTitle} | format-table id,name,mainwindowtitle -AutoSize"

This will list all of the processes that have a non-empty window title.
Store this list in some file using PS command,
Then,
Use code for killing running process such as,
Get-Process excel | Where { $_.StartTime -lt (Get-Date).AddMinutes(-30) } | Stop-Process -Force

Then again list all of the processes that have a non-empty window title and compare with earlier list.
You will get process path of killed process and using string pattern evaluation you can get filename of the process.


text:
Q: Node.js: How to create "smooth" restart of launched app? Is it possible to create smooth restart of node.js application without downtime at all?
Thanks ;)

A: I took an approach similar to PartlyCloudy, but just using multiple node threads on the same process, and using the OS as the load balancer instead of a separate one.
So I have code in my "app.coffee" code that's stolen from:

*

*https://github.com/isaacs/node-supervisor/issues/40

*http://nodejs.org/api/cluster.html
I only added a "setTimeout". For a period of 5-20 seconds I may have 16 forks on my 8 cores instead of 8, but that's better for me than downtime.
var childProcesses, cluster, i, numCPUs, signals, _i;

cluster = require('cluster');
numCPUs = require('os').cpus().length;

if (cluster.isMaster) {
  childProcesses = [];
  for (i in numCPUs) {
    childProcesses[i] = cluster.fork();
  }
  signals = ["SIGINT", "SIGTERM", "SIGQUIT"];
  for (i in signals) {
    process.on(signals[i], function() {

      // THIS IS WHAT KEEPS IT UP
      setTimeout(function() {
        var j;
        for (j in childProcesses) {
          childProcesses[j].kill();
        }
        process.exit();
      }, 20000);

    });
  }
  cluster.on('exit', function(worker, code, signal) {
    childProcesses.push(cluster.fork());
  });
} else {
  app.listen(3000);
}

A: Depending on your use case, application style and statefulness, you might also start multiple node processes running the same application and put a reverse proxy/load balancer in front (i.e. HAProxy). In case of a crash of a process, the load balancer will dispatch new requests to other processes, as long as the node has not yet restarted. This also improves performance by utilizing multiple cores. However, shared states such as sessions might be more tricky to handle (i.e. externally using Redis).

A: in case of an crash of your script you will everytime have a downtime, it's not possible to prevent. But you can use forever.js to automagically restart your script whenever it crashes.


text:
Q: Add fading effect in songs playlist using AVAudioPlayer and MPMusicPlayerController in ios I need to add fade in/out feature in songs playlist (playlist songs are retrive from ipod library).
When one song end i need to fade out effect and next song start i need to fade in effect
and one other think during fading system or media VOLUME should not changed.
I am using MPMusicPlayerController for play song.

A: Here is an extension to AVAudioPlayer that I wrote (pre-ARC) that does exactly what you want.
The header AVAudioPlayer+FadeControl.h:
#import <Foundation/Foundation.h>
#import <AVFoundation/AVFoundation.h>

@interface AVAudioPlayer (FadeControl)

-(void)fadeOutWithDuration:(NSTimeInterval)inFadeOutTime;

@end

And the source AVAudioPlayer+FadeControl.m:
#import "AVAudioPlayer+FadeControl.h"

#define     kFadeSteps  20.0

@implementation AVAudioPlayer (FadeControl)

-(void)fadeOutWithDuration:(NSTimeInterval)inFadeOutTime
{
    NSTimeInterval fireInterval = inFadeOutTime/kFadeSteps;
    float volumeDecrement = 1.0/kFadeSteps;
    float originalVolume = self.volume;

    self.volume = originalVolume - volumeDecrement;

    [self retain];
    [NSTimer scheduledTimerWithTimeInterval:fireInterval target:self selector:@selector(fadeOutTimerMethod:) userInfo:[NSNumber numberWithFloat:originalVolume] repeats:YES];

}

- (void)fadeOutTimerMethod:(NSTimer*)theTimer
{
    float volumeDecrement = 1.0/kFadeSteps;

    if (self.volume > volumeDecrement)
    {
        self.volume = self.volume - volumeDecrement;
    }
    else if ( [theTimer isValid] )
    {
        [self stop];

        NSNumber* originalVolume = [theTimer userInfo];
        self.volume = [originalVolume floatValue];

        [theTimer invalidate];
    }
    else
    {
        [self stop];
        [self release];
    }

}

@end

It should be trivial to ad an playWithFadeInDuration: method. To use in an ARC project, just add -fno-objc-arc to the file's compile flags.

A: -(void)doFadeInVolume {

//play
[audioPlayerMain play];

if (audioPlayerMain.volume < 1.0) {
audioPlayerMain.volume = audioPlayerMain.volume + 0.1;
[self performSelector:@selector(doVolumeFadeMainIn) withObject:nil afterDelay:0.2];
}
}

And can use the opposite approach for fading out the volume.  Hope this helps.


text:
Q: Passing pointer to dynamically allocated array by copy to function has unexpected result I was just messing around with passing pointers to functions to wrap my head around how it works and I came across some behavior that was unexpected. I have the following code:
#include <iostream>
#include <string>
#include <fstream>
#include <sstream>
#include <cmath>
#include <iomanip>

using namespace std;

struct t
{
    string x;
    string y;
};

void foo(t*);

int main()
{

    t* ts = new t[2];
    ts[0].x = "t1.x";
    ts[0].y = "t1.y";
    ts[1].x = "t2.x";
    ts[1].y = "t2.y";

    foo(ts);

    cout << ts[0].x << endl;

}

void foo(t* s)
{
    delete[] s;
    s = new t[2];
    s[0].x = "FOO.X";
    s[1].y = "FOO.Y";
}

The output here, interestingly enough, is "FOO.X". I expected that since inside of foo, s is a copy of the pointer ts that when I delete[] s I effectively delete[] ts as they both point to the same address. Then s = new t[2]; should have no effect on ts. After foo returns, I should no longer have access to s or the array it points to and ts should point to who knows where. Am I missing somehthing?
Note: This is just a test project that I made where I constantly write and erase blocks of code to test different concepts. All the includes and using namespace std is for ease of use, and it is NOT code that I am writing for any sort of practical use, purely educational. Also, I am using MS VS 2013.

A: Try changing your foo() like this and see the result:
void foo(t* s)
{
  delete[] s;

  // Additional memory allocation
  t* u = new t[2];

  s = new t[2];
  s[0].x = "FOO.X";
  s[1].y = "FOO.Y";
}

By adding another memory allocation, I moved s to another location in the memory, which is not anymore overlapping with ts. Otherwise, s was simply allocated at the same location where ts previously resided.
As pointed out in the comments, you are observing an undefined behavior, which you should by no means rely on. The example above illustrates that pretty well.


text:
Q: Why is Jabba's stand-in on the cover of the Star Wars Radio Drama?
This person appears to be Declan Mulholland, the stand-in from the deleted scene in which Jabba the Hutt was meant to appear:

Mulholland would have been replaced with a stop-motion creature during post-production had the scene not ended up on the cutting room floor.
  - source

The look for the stand-in was never canon; Jabba was never going to look like the that.
Why does his face appear on the official Radio Drama cover if he was just standing-in for where Jabba was meant to appear?

A: Heater
In the Radio Drama, Jabba's lines from spaceport scene in A New Hope were kept but given to a humanoid character named "Heater" — this is described, for instance, in A Brief Guide to Star Wars by Brian J. Robb.  For the cover artwork, Mulholland's likeness was used, given that he was the human giving those same lines in the unused footage.
Heater also appeared in Star Wars: The Essential Guide to Characters. The Essential Guide sketch reaffirmed Heater's look as being that of Declan Mulholland from his stand-in portrayal of Jabba.

In short, "Heater" was a retcon name given to Declan Mulholland's "Jabba", and this became part of the Radio Drama.  The cover reflects this.

A: This interview with Randy Martinez, the picture's illustrator has confirmed that the character depicted is "Heater", a high-ranking henchman of Jabba the Hutt.

The character on the right with the
crazy hair is Heater. No, that's his name… Heater. Truth be told, he
was Jabba in the original script. They actually shot these Jabba
scenes with the actor who depicted in my painting. Several years
later, Lucasfilm reinserted the confrontation scene Han Solo has with
Jabba the Hutt outside of the Millenium Falcon, but put a CG Jabba the
Hut over the actor who portrayed Jabba in the original filming.
By
1981, when the Radio Drama was produced, Lucasfilm had already started
developing Jabba the Hutt for Return of the Jedi. As we all know Jabba
is a big slimy slug-like Hutt, and does not speak English.  To patch
this continuity problem, Lucasfilm changed the name of the Jabba
character to Heater for the Radio Drama. But then, in the movies he
went back to being Jabba the Hutt for the Special Edition… I know it's
confusing, but Heater, for all intents and purposes, is Jabba the
Hutt.


text:
Q: How to deactivate firebug? How can I completly deactivate firebug without uninstalling it?
I installed firebug because there are some cool extensions like "Firepath" so you can read out the Xpath. However, there are also some missing features which are included in the normal dev console, e.g. manipulating the CSS of the currently selected element.
So to use these features I have to switch back to the normal developer console. However, firebug is still active after deactivating the addon.

Still appears in the menu at the top:

And if I press F12 then Firebug opens.

A: Normally, deactivating an extension within the Add-on Manager, like you did, completely deactivates it.
When it's still activated, it's a bug and you should file a bug report.
Having said that, note that Firebug's development is discontinued and it will not work anymore once multi-process Firefox is enabled. Furthermore, Mozilla plans to stop supporting extensions that are not based on the WebExtension framework starting from Firefox 57, which is released in November 2017. At latest at that point in time Firebug (as well as most existing Firefox extensions) definitely stops working.
Regarding the XPath features, there are several feature requests filed for the DevTools already asking to implement advanced XPath support.


text:
Q: Prove that $(B(A),\|\cdot\|_\infty)$ is a Banach Space I need to prove that $(B(A),\|\cdot\|_\infty)$ is a Banach Space, where $B(A)$ is the set of bounded functios from $ A $ to $\mathbb R$. I have seen the proof but I don't understand it. This is what I have:
First, we take ${f_n}$ a Cauchy sucession. As it 'lives' in $\mathbb R$, because of the completeness of real numbers we know that this sucession is convergent. My question is: why the proof doesn't finish here? The proof that I'm following now proves that our sucession converges to another function with the infinite norm, but we know that, in $\mathbb R$, all norms are equivalent.
Can somebody help me?

A: By a fenced function $f: A \rightarrow \mathbb{R}$, do you mean $|f(x)| \leq C$, for some $C < \infty$, $\forall x \in \mathbb{R}$ ? i.e., $B(A)$ is the set of all bounded functions.
Its true that $f_n(x) \rightarrow g(x)$ for some $g(x) \in \mathbb{R}$. what you now need to show is:

*

*You need to show $|f_n(x)-g(x)| \leq \epsilon$, forall $x \in \mathbb{R}$ (uniformly), for all $n \geq N'_{\epsilon}$. Note that $N'_{\epsilon}$ should not depend on $x$.

*Further you need to show that $|g(x)| \leq C'$ for some $C' < \infty$ for all $x \in \mathbb{R}$. Note that $C'$ should not depend on $x$. Inparticular as $x \rightarrow \infty$, $g(x) \rightarrow \infty$ should not happen.
a) Point 1):
If $f_n$ is cauchy, it means $||f_n(x) - f_m(x)|| \leq \epsilon$ for all $x \in \mathbb{R}$, for all $n,m \geq N_{\epsilon}$.
This implies $|f_{N_{\epsilon}}(x) - g(x)|  = |f_{N_{\epsilon}}(x) -f_n(x)+f_n(x)- g(x)| \leq |f_{N_{\epsilon}}(x) -f_n(x)|+|f_n(x)-g(x)|$.
By taking $n$ very large such that $|f_n(x)-g(x)| \leq \epsilon$, for all $n \geq \max(M(x),N_{\epsilon})$ ($M$ could be dependent on $x$. So i wrote it as $M(x)$).
we have
$|f_{N_{\epsilon}}(x) - g(x)| \leq |f_{N_{\epsilon}}(x) -f_n(x)|+|f_n(x)-g(x)| \leq |f_{N_{\epsilon}}(x) -f_n(x)|+\epsilon$, for all $n \geq \max(M(x),N_{\epsilon})$.
But we have that
$|f_{N_{\epsilon}}(x) -f_n(x)| \leq \epsilon$ for all $x$. Hence
$|f_{N_{\epsilon}}(x) - g(x)| \leq |f_{N_{\epsilon}}(x) -f_n(x)|+\epsilon \leq 2 \epsilon $, for all $n \geq \max(M(x),N_{\epsilon})$.
Hence we have,
$|f_{N_{\epsilon}}(x) - g(x)| \leq 2 \epsilon$ for all $x \in \mathbb{R}$ for all $n \geq \max(M(x),N_{\epsilon})$. But $n$ does not appear in the inequality. So we have that
$|f_{N_{\epsilon}}(x) - g(x)| \leq 2 \epsilon$ for all $x \in \mathbb{R}$.
Hence Point 1) is proved.
b) Point 2): From previous point, we have that, $||f_n(x)-g(x)|| \leq \epsilon$ for all $x \in \mathbb{R}$, for all $n \geq N'_{\epsilon}$.
Since $|f_{N_{\epsilon}}(x)| \leq C''$, for some $C'' < \infty$ for all $x \in \mathbb{R}$ and we have $||f_{N_{\epsilon}}(x)-g(x)|| \leq \epsilon$ for all $x \in \mathbb{R}$$\implies |g(x)| \leq |f_{N_{\epsilon}}(x)|+\epsilon \leq C''+\epsilon$ for all $x \in \mathbb{R}$ and $C'' < \infty$.
Hence Point 2) is proved.

A: Each sequence $\big(f_n(t)\big)_n \in \mathbb{R}^\mathbb{N}$ does converge to a certain real $f(t)$, however a priori this new function $f$ might not be the limit of the sequence of functions $(f_n)_n \in B(A)^\mathbb{N}$, nor is it a priori bounded (I'm guessing that what "fenced" means), however these are true statements, and that's what is to be proved here.
Take $f_n : t \in [0,1] \mapsto t^n$ for example.
The corresponding "limit" (which is called pointwise limit) $f$ would be the function:
$$f : t \mapsto \lim_{n \to \infty} f_n(t) = \begin{cases}0 \quad\text{if }t \neq 1\\ 1 \quad\text{if } t = 1\end{cases}$$
Yet, we have:
$$\|f_n - f\|_\infty = \sup_{t \in [0,1]} |f_n(t) - f(t)| = \max\left(|f_n(1) - f(1)|, \sup_{t \in [0,1)} |f_n(t)|\right) = 1 \underset{n \to \infty}{\not\to} 0$$
due to the fact that $f_n(t) \xrightarrow[t \to 1^-]{} 1$ for all $n$, and as such $(f_n)_n$ doesn't converge to $f$ in $B([0,1], \|\cdot\|_\infty)$.
This does not contradict the fact that norms are equivalent on $\mathbb{R}^d$, simply because you are trying to compare $(\mathbb{R}, |\cdot|)$ and $(B(A), \|\cdot\|_\infty)$, but $\mathbb{R}$ and $B(A)$ are two different spaces altogether!


text:
Q: How to perform template manipulation after manual $compile? I need to render a list of categories in a webapp I'm developing using AngularJS.
Each category can have an array of subcategories.
In order to render them, I created a recursive category directive that works like this:

*

*if the category doesn't have subcategories, render as a complete category.

*if the category has subcategories, render the supercategory as a container for subcategories, and insert and compile the subcategories.
This is the code of the directive:
.directive('category',
  function(WeeklyCalendar, categoryRowsFactory, $compile){
    return {
      replace: true,
      restrict: 'A',
      templateUrl: 'new-category-tpl',
      scope: {
        category: '=categoryData'
      },
      link: function (scope, elem, attrs) {
        //recursive categories rendering
        if(scope.category.subcategories) {
          $compile('

')
          (scope, function(cloned, scope){ elem.append(cloned) })
        }

        /* This works */
        //elem.append('aaa');

        /* This doesn't */
        elem.find('.content').append('aaa');
      }
    };
})

Everything working well so far, you can check the result here: codepen
So, each category has category-rows that are split in a header and a content, like this:

Now, I need to append some HTML to the div with class content from the link function. Anyway, using the classic element.find('.content').append('string') won't work, as find returns no result. (even if jQuery is included). Strangely enough, because if you inspect the HTML you can see that each category clearly has a category-row children, which contains a .content div. Simply appending to element works, but it's not enough for me.
By the way, this is the template for a category:

Nothing fancy, as far as I can see.
I wasted an entire afternoon trying to understand what I'm missing, without success. Maybe you will be smarter/luckier. So, does anyone know why element.find(..) doesn't work in that link function?
Update
The solution from ExpertSystem works, up to a point. I am able to append in the $timeout call, that part is fine. But later I need to access the same element I append in the directive's controller, but the template is still uncompiled and it doesn't work.
Maybe I am using the wrong approach. This is what I am trying to achieve:

*

*I need to display categories in a calendar;

*These categories can be of three types:

*

*Single categories, they have a single row in which I display events;

*Multi categories, they have many rows in which I display events;

*Categories with subcategories, they have a row for each subcategory.

*Each row of the category features empty placeholder cells for days without events;

*I created a recursive template that renders a category as a container for subcategories, or as a row made of a .header with the category name and a .content; The .content is simply a empty div in the template.

*My idea is that, since the empty placeholder cells don't have to be data-bound to anything, I could insert them in the link function by jQuery (since I have to check how many of them have to be inserted, depending on the size of the calendar; I also need to check if I have to append only one row of cells or many rows, depending on the type of category).

*These cells would be useful in placing the events at a later time: the event would ask to the cateogory controller for the position of the right cell, and place itself at the same position by means of elem.css or ng-style.

This becomes impossible if element becomes inaccessible, since I have to place events with absolute positioning and I need to know top and left. I Here is a short version of what I'm trying to achieve in the end:
.directive('category',function(){
   //...usual stuff
   controller: function($scope, $element){
       this.getPosition = function(date) {
           var cellSelector//compute selector for placeholder cell depending on date
           var cell = $element.find(cellSelector);
           return { top: cell.top(), left: cell.left()}
       }
   }
})

.directive('event',function(){
    //...usual stuff
    require: '^category',
    link: function(scope, elem, attrs, categoryCtrl) {
        var position = categoryCtrl.getPosition(scope.event.date);
        element.css(positiong);
    }
})

I am out of ideas. Can someone think of a better way to achieve what I described?

A: The "problem" is that ngIf (among other directives) removes the template from the DOM and decides what/if to append at a later time (after a few $digest loops).
So at the time you try to access .content, the element's innerHTML looks like this:

The "safest" to access .content once it is rendered is to wrap your code into a $timeout callback:
$timeout(function () {
    elem.find('.content').text('aaa');
});

See, also, this short demo.


text:
Q: JVM issues keeps crashing I'm using IntellJ IDEA 13 CE and jdk 1.7.
Compiling my project results in no errors. When I try to run the application, I'm notified that:
The last time you opened java, it unexpectedly quit while reopening windows. Do you want to try to reopen its windows again?
Given options reopen/don't reopen, both lead to this error log, and I'm frightened. I've tried reinstalling all my jdk's and intellij:
  #
  # A fatal error has been detected by the Java Runtime Environment:
  #
  #  SIGSEGV (0xb) at pc=0x0000000109d00633, pid=15131, tid=6403
  #
  # JRE version: Java(TM) SE Runtime Environment (7.0_60-b19) (build 1.7.0_60-b19)
  # Java VM: Java HotSpot(TM) 64-Bit Server VM (24.60-b09 mixed mode bsd-amd64 compressed oops)
  # Problematic frame:
  # V  [libjvm.dylib+0x300633]
  #
  # Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
  #
  # If you would like to submit a bug report, please visit:
  #   http://bugreport.sun.com/bugreport/crash.jsp
  #

  ---------------  T H R E A D  ---------------

  Current thread (0x00007fb353000000):  JavaThread "main" [_thread_in_vm, id=6403, stack(0x000000010a460000,0x000000010a560000)]

  siginfo:si_signo=SIGSEGV: si_errno=0, si_code=1 (SEGV_MAPERR), si_addr=0x0000000000000009

  Registers:
  RAX=0x00000006fb043f00, RBX=0x00007fb352b00d50, RCX=0x000000010a20c203, RDX=0x0000000000000001
  RSP=0x000000010a55e0e0, RBP=0x000000010a55e100, RSI=0x000000010a179830, RDI=0x00000007aaaefba8
  R8 =0x0000000000000320, R9 =0x0000000000000258, R10=0x00007fb350c05330, R11=0x00007fff7744ddb8
  R12=0x00007fb3530001e8, R13=0x000000010a55e208, R14=0x00000007aaaad2f8, R15=0x00007fb3530001e8
  RIP=0x0000000109d00633, EFLAGS=0x0000000000010202, ERR=0x0000000000000004
    TRAPNO=0x000000000000000e

  Top of Stack: (sp=0x000000010a55e0e0)
  0x000000010a55e0e0:   00007fb353000000 00000007aaaad2f8
  0x000000010a55e0f0:   00007fb3530001e8 00007fb353000000
  0x000000010a55e100:   000000010a55e130 0000000109d0d91e
  0x000000010a55e110:   000000010a55e130 0000000000000000
  0x000000010a55e120:   0000000000000000 0000000000000000
  0x000000010a55e130:   000000010a55e1c0 000000012014722b
  0x000000010a55e140:   000000010a55e198 000000900a55e290
  0x000000010a55e150:   0000032000000258 0000014000000096
  0x000000010a55e160:   000000010a55e2d8 00007fb353000000
  0x000000010a55e170:   000000010a55e1b0 0000000109cd555f
  0x000000010a55e180:   00007fb353000000 000000010a55e200
  0x000000010a55e190:   00007fb353000000 00000006fb35f040
  0x000000010a55e1a0:   0000000000000000 00000006fb35f038
  0x000000010a55e1b0:   000000010a55e2d8 00007fb353000000
  0x000000010a55e1c0:   000000010a55e268 000000010a5c2758
  0x000000010a55e1d0:   0000000000000000 0000000100000000
  0x000000010a55e1e0:   0000000100000000 0000000100000000
  0x000000010a55e1f0:   000000010a55e290 0000000000000000
  0x000000010a55e200:   00000007aaaad2f8 000000010a55e208
  0x000000010a55e210:   00000006fb2a6d4e 000000010a55e258
  0x000000010a55e220:   00000006fb2b3fe8 000000010a55e228
  0x000000010a55e230:   00000006fb35f038 000000010a55e2d8
  0x000000010a55e240:   00000006fb388cb0 0000000000000000
  0x000000010a55e250:   00000006fb35f040 0000000000000000
  0x000000010a55e260:   000000010a55e288 000000010a55e328
  0x000000010a55e270:   000000010a5b6233 0000000000000000
  0x000000010a55e280:   000000010a5becdb 0000000000000000
  0x000000010a55e290:   00000007ab91a5c8 0000000000000000
  0x000000010a55e2a0:   0000000000000000 0000000000000000
  0x000000010a55e2b0:   0000000000000000 0000000000000258
  0x000000010a55e2c0:   0000000000000320 0000000000000096
  0x000000010a55e2d0:   0000000000000140 00000007ab754f58

  Instructions: (pc=0x0000000109d00633)
  0x0000000109d00613:   c0 75 04 30 c0 eb 39 48 8d 0d ff bb 50 00 80 39
  0x0000000109d00623:   00 49 8b 16 74 15 48 8d 35 00 92 47 00 8a 4e 08
  0x0000000109d00633:   8b 7a 08 48 d3 e7 48 03 3e eb 04 48 8b 7a 08 48
  0x0000000109d00643:   83 c7 10 48 89 c6 e8 2a 90 f3 ff 84 c0 0f 95 c0

  Register to memory mapping:

  RAX=0x00000006fb043f00 is an oop
  {instance class}
   - klass: {other class}
  RBX=0x00007fb352b00d50 is a global jni handle
  RCX=0x000000010a20c203: heapOopSize+0x3 in /Library/Java/JavaVirtualMachines/jdk1.7.0_60.jdk/Contents/Home/jre/lib/server/libjvm.dylib at 0x0000000109a00000
  RDX=0x0000000000000001 is an unknown value
  RSP=0x000000010a55e0e0 is pointing into the stack for thread: 0x00007fb353000000
  RBP=0x000000010a55e100 is pointing into the stack for thread: 0x00007fb353000000
  RSI=0x000000010a179830: _ZN8Universe11_narrow_oopE+0 in /Library/Java/JavaVirtualMachines/jdk1.7.0_60.jdk/Contents/Home/jre/lib/server/libjvm.dylib at 0x0000000109a00000
  RDI=0x00000007aaaefba8 is an oop
  java.lang.Class
   - klass: 'java/lang/Class'
  R8 =0x0000000000000320 is an unknown value
  R9 =0x0000000000000258 is an unknown value
  R10=0x00007fb350c05330 is an unknown value
  R11=0x00007fff7744ddb8: OBJC_CLASS_$_NSAutoreleasePool+0 in /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation at 0x00007fff8e75b000
  R12=0x00007fb3530001e8 is an unknown value
  R13=0x000000010a55e208 is pointing into the stack for thread: 0x00007fb353000000
  R14=0x00000007aaaad2f8 is an oop
  java.lang.Boolean
   - klass: 'java/lang/Boolean'
  R15=0x00007fb3530001e8 is an unknown value

  Stack: [0x000000010a460000,0x000000010a560000],  sp=0x000000010a55e0e0,  free space=1016k
  Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
  V  [libjvm.dylib+0x300633]
  V  [libjvm.dylib+0x30d91e]
  C  [liblwjgl.jnilib+0xc22b]  Java_org_lwjgl_opengl_MacOSXDisplay_nCreateWindow+0x9b
  j  org.lwjgl.opengl.MacOSXDisplay.nCreateWindow(IIIIZZZZLjava/nio/ByteBuffer;Ljava/nio/ByteBuffer;)Ljava/nio/ByteBuffer;+0
  j  org.lwjgl.opengl.MacOSXDisplay.createWindow(Lorg/lwjgl/opengl/DrawableLWJGL;Lorg/lwjgl/opengl/DisplayMode;Ljava/awt/Canvas;II)V+120
  j  org.lwjgl.opengl.Display.createWindow()V+71
  j  org.lwjgl.opengl.Display.create(Lorg/lwjgl/opengl/PixelFormat;Lorg/lwjgl/opengl/Drawable;Lorg/lwjgl/opengl/ContextAttribs;)V+72
  j  org.lwjgl.opengl.Display.create(Lorg/lwjgl/opengl/PixelFormat;)V+12
  j  org.newdawn.slick.AppGameContainer.tryCreateDisplay(Lorg/lwjgl/opengl/PixelFormat;)V+7
  j  org.newdawn.slick.AppGameContainer.access$000(Lorg/newdawn/slick/AppGameContainer;Lorg/lwjgl/opengl/PixelFormat;)V+2
  j  org.newdawn.slick.AppGameContainer$2.run()Ljava/lang/Object;+36
  v  ~StubRoutines::call_stub
  V  [libjvm.dylib+0x2db350]
  V  [libjvm.dylib+0x2db120]
  V  [libjvm.dylib+0x32e8f0]
  j  java.security.AccessController.doPrivileged(Ljava/security/PrivilegedAction;)Ljava/lang/Object;+0
  j  org.newdawn.slick.AppGameContainer.setup()V+112
  j  org.newdawn.slick.AppGameContainer.start()V+1
  j  pong.Pong.<init>(Ljava/lang/String;Lserver/PongServer;Lserver/Player;Lserver/Player;)V+206
  j  pong.Pong.<init>(Ljava/lang/String;)V+5
  j  pong.Pong.main([Ljava/lang/String;)V+6
  v  ~StubRoutines::call_stub
  V  [libjvm.dylib+0x2db350]
  V  [libjvm.dylib+0x2db120]
  V  [libjvm.dylib+0x465f40]
  V  [libjvm.dylib+0x4663a6]
  V  [libjvm.dylib+0x327b83]
  j  sun.reflect.NativeMethodAccessorImpl.invoke0(Ljava/lang/reflect/Method;Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+0
  j  sun.reflect.NativeMethodAccessorImpl.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+87
  j  sun.reflect.DelegatingMethodAccessorImpl.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+6
  j  java.lang.reflect.Method.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+57
  j  com.intellij.rt.execution.application.AppMain.main([Ljava/lang/String;)V+163
  v  ~StubRoutines::call_stub
  V  [libjvm.dylib+0x2db350]
  V  [libjvm.dylib+0x2db120]
  V  [libjvm.dylib+0x30e99a]
  V  [libjvm.dylib+0x307b35]
  C  [java+0x30fe]  JavaMain+0x91d
  C  [libsystem_pthread.dylib+0x1899]  _pthread_body+0x8a
  C  [libsystem_pthread.dylib+0x172a]  _pthread_struct_init+0x0
  C  [libsystem_pthread.dylib+0x5fc9]  thread_start+0xd

  Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
  j  org.lwjgl.opengl.MacOSXDisplay.nCreateWindow(IIIIZZZZLjava/nio/ByteBuffer;Ljava/nio/ByteBuffer;)Ljava/nio/ByteBuffer;+0
  j  org.lwjgl.opengl.MacOSXDisplay.createWindow(Lorg/lwjgl/opengl/DrawableLWJGL;Lorg/lwjgl/opengl/DisplayMode;Ljava/awt/Canvas;II)V+120
  j  org.lwjgl.opengl.Display.createWindow()V+71
  j  org.lwjgl.opengl.Display.create(Lorg/lwjgl/opengl/PixelFormat;Lorg/lwjgl/opengl/Drawable;Lorg/lwjgl/opengl/ContextAttribs;)V+72
  j  org.lwjgl.opengl.Display.create(Lorg/lwjgl/opengl/PixelFormat;)V+12
  j  org.newdawn.slick.AppGameContainer.tryCreateDisplay(Lorg/lwjgl/opengl/PixelFormat;)V+7
  j  org.newdawn.slick.AppGameContainer.access$000(Lorg/newdawn/slick/AppGameContainer;Lorg/lwjgl/opengl/PixelFormat;)V+2
  j  org.newdawn.slick.AppGameContainer$2.run()Ljava/lang/Object;+36
  v  ~StubRoutines::call_stub
  j  java.security.AccessController.doPrivileged(Ljava/security/PrivilegedAction;)Ljava/lang/Object;+0
  j  org.newdawn.slick.AppGameContainer.setup()V+112
  j  org.newdawn.slick.AppGameContainer.start()V+1
  j  pong.Pong.<init>(Ljava/lang/String;Lserver/PongServer;Lserver/Player;Lserver/Player;)V+206
  j  pong.Pong.<init>(Ljava/lang/String;)V+5
  j  pong.Pong.main([Ljava/lang/String;)V+6
  v  ~StubRoutines::call_stub
  j  sun.reflect.NativeMethodAccessorImpl.invoke0(Ljava/lang/reflect/Method;Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+0
  j  sun.reflect.NativeMethodAccessorImpl.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+87
  j  sun.reflect.DelegatingMethodAccessorImpl.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+6
  j  java.lang.reflect.Method.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+57
  j  com.intellij.rt.execution.application.AppMain.main([Ljava/lang/String;)V+163
  v  ~StubRoutines::call_stub

  ---------------  P R O C E S S  ---------------

  Java Threads: ( => current thread )
    0x00007fb352012800 JavaThread "AWT-Shutdown" [_thread_blocked, id=31243, stack(0x000000011c436000,0x000000011c536000)]
    0x00007fb352012000 JavaThread "AppKit Thread" daemon [_thread_in_native, id=3335, stack(0x00007fff57297000,0x00007fff57317000)]
    0x00007fb3530bb000 JavaThread "Thread-0" [_thread_in_native, id=22787, stack(0x000000011a3a2000,0x000000011a4a2000)]
    0x00007fb3530b6000 JavaThread "Monitor Ctrl-Break" daemon [_thread_in_native, id=22275, stack(0x000000011a1c8000,0x000000011a2c8000)]
    0x00007fb351061000 JavaThread "Service Thread" daemon [_thread_blocked, id=21251, stack(0x0000000119dd4000,0x0000000119ed4000)]
    0x00007fb351060000 JavaThread "C2 CompilerThread1" daemon [_thread_blocked, id=20739, stack(0x0000000119cd1000,0x0000000119dd1000)]
    0x00007fb35105e800 JavaThread "C2 CompilerThread0" daemon [_thread_blocked, id=20227, stack(0x0000000119bce000,0x0000000119cce000)]
    0x00007fb351059000 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=19715, stack(0x0000000119acb000,0x0000000119bcb000)]
    0x00007fb35104e000 JavaThread "Finalizer" daemon [_thread_blocked, id=14595, stack(0x000000011987a000,0x000000011997a000)]
    0x00007fb35104d800 JavaThread "Reference Handler" daemon [_thread_blocked, id=14083, stack(0x0000000119777000,0x0000000119877000)]
  =>0x00007fb353000000 JavaThread "main" [_thread_in_vm, id=6403, stack(0x000000010a460000,0x000000010a560000)]

  Other Threads:
    0x00007fb35104b000 VMThread [stack: 0x0000000119674000,0x0000000119774000] [id=13571]
    0x00007fb35105a000 WatcherThread [stack: 0x0000000119ed7000,0x0000000119fd7000] [id=21763]

  VM state:not at safepoint (normal execution)

  VM Mutex/Monitor currently owned by a thread: None

  Heap
   PSYoungGen      total 76800K, used 15860K [0x00000007aaa80000, 0x00000007b0000000, 0x0000000800000000)
    eden space 66048K, 24% used [0x00000007aaa80000,0x00000007ab9fd380,0x00000007aeb00000)
    from space 10752K, 0% used [0x00000007af580000,0x00000007af580000,0x00000007b0000000)
    to   space 10752K, 0% used [0x00000007aeb00000,0x00000007aeb00000,0x00000007af580000)
   ParOldGen       total 174592K, used 0K [0x0000000700000000, 0x000000070aa80000, 0x00000007aaa80000)
    object space 174592K, 0% used [0x0000000700000000,0x0000000700000000,0x000000070aa80000)
   PSPermGen       total 21504K, used 6270K [0x00000006fae00000, 0x00000006fc300000, 0x0000000700000000)
    object space 21504K, 29% used [0x00000006fae00000,0x00000006fb41fa08,0x00000006fc300000)

  Card table byte_map: [0x000000010d670000,0x000000010de9a000] byte_map_base: 0x0000000109e99000

  Polling page: 0x00000001089fd000

  Code Cache  [0x000000010a5b0000, 0x000000010a820000, 0x000000010d5b0000)
   total_blobs=287 nmethods=28 adapters=214 free_code_cache=48651Kb largest_free_block=49795776

  Compilation events (10 events):
  Event: 0.209 Thread 0x00007fb351060000   24             sun.misc.URLClassPath::getResource (74 bytes)
  Event: 0.217 Thread 0x00007fb35105e800 nmethod 20 0x000000010a622190 code [0x000000010a6223a0, 0x000000010a623370]
  Event: 0.217 Thread 0x00007fb35105e800   25   !         sun.misc.URLClassPath$JarLoader::getResource (91 bytes)
  Event: 0.234 Thread 0x00007fb35105e800 nmethod 25 0x000000010a623d10 code [0x000000010a623f60, 0x000000010a624f18]
  Event: 0.234 Thread 0x00007fb35105e800   26             sun.misc.MetaIndex::mayContain (51 bytes)
  Event: 0.237 Thread 0x00007fb35105e800 nmethod 26 0x000000010a61e4d0 code [0x000000010a61e640, 0x000000010a61e8c8]
  Event: 0.292 Thread 0x00007fb351060000 nmethod 24 0x000000010a62b390 code [0x000000010a62b8c0, 0x000000010a62f1d0]
  Event: 1.586 Thread 0x00007fb35105e800   27             java.lang.String::startsWith (7 bytes)
  Event: 1.588 Thread 0x00007fb35105e800 nmethod 27 0x000000010a619e50 code [0x000000010a619fa0, 0x000000010a61a138]
  Event: 1.609 Thread 0x00007fb351060000   28             java.util.Arrays::copyOf (19 bytes)

  GC Heap History (0 events):
  No events

  Deoptimization events (0 events):
  No events

  Internal exceptions (10 events):
  Event: 1.590 Thread 0x00007fb353000000 Threw 0x00000007ab8c89c0 at /HUDSON/workspace/7u-2-build-macosx-x86_64/jdk7u60/1081/hotspot/src/share/vm/prims/jvm.cpp:1244
  Event: 1.590 Thread 0x00007fb353000000 Threw 0x00000007ab8cced0 at /HUDSON/workspace/7u-2-build-macosx-x86_64/jdk7u60/1081/hotspot/src/share/vm/prims/jvm.cpp:1244
  Event: 1.599 Thread 0x00007fb353000000 Threw 0x00000007ab8fafc8 at /HUDSON/workspace/7u-2-build-macosx-x86_64/jdk7u60/1081/hotspot/src/share/vm/prims/jvm.cpp:1244
  Event: 1.599 Thread 0x00007fb353000000 Threw 0x00000007ab8ff5c0 at /HUDSON/workspace/7u-2-build-macosx-x86_64/jdk7u60/1081/hotspot/src/share/vm/prims/jvm.cpp:1244
  Event: 1.600 Thread 0x00007fb353000000 Threw 0x00000007ab904a80 at /HUDSON/workspace/7u-2-build-macosx-x86_64/jdk7u60/1081/hotspot/src/share/vm/prims/jvm.cpp:1244
  Event: 1.600 Thread 0x00007fb353000000 Threw 0x00000007ab909f00 at /HUDSON/workspace/7u-2-build-macosx-x86_64/jdk7u60/1081/hotspot/src/share/vm/prims/jvm.cpp:1244
  Event: 1.601 Thread 0x00007fb353000000 Threw 0x00000007ab911bb0 at /HUDSON/workspace/7u-2-build-macosx-x86_64/jdk7u60/1081/hotspot/src/share/vm/prims/jvm.cpp:1244
  Event: 1.602 Thread 0x00007fb353000000 Threw 0x00000007ab9163b0 at /HUDSON/workspace/7u-2-build-macosx-x86_64/jdk7u60/1081/hotspot/src/share/vm/prims/jvm.cpp:1244
  Event: 1.609 Thread 0x00007fb353000000 Threw 0x00000007ab91abd8 at /HUDSON/workspace/7u-2-build-macosx-x86_64/jdk7u60/1081/hotspot/src/share/vm/prims/jvm.cpp:1244
  Event: 1.609 Thread 0x00007fb353000000 Threw 0x00000007ab920770 at /HUDSON/workspace/7u-2-build-macosx-x86_64/jdk7u60/1081/hotspot/src/share/vm/prims/jvm.cpp:1244

  Events (10 events):
  Event: 1.601 loading class 0x00007fb353885f00
  Event: 1.601 loading class 0x00007fb353885f00 done
  Event: 1.601 loading class 0x00007fb352839840
  Event: 1.601 loading class 0x00007fb352839840 done
  Event: 1.602 loading class 0x00007fb3518bc770
  Event: 1.603 loading class 0x00007fb3518bc770 done
  Event: 1.609 loading class 0x00007fb352b65ef0
  Event: 1.609 loading class 0x00007fb352b65ef0 done
  Event: 1.609 loading class 0x00007fb352839a50
  Event: 1.609 loading class 0x00007fb352839a50 done

  Dynamic libraries:
  0x000000000571c000    /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa
  0x000000000571c000    /System/Library/Frameworks/Security.framework/Versions/A/Security
  0x000000000571c000    /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices
  0x000000000571c000    /usr/lib/libz.1.dylib
  0x000000000571c000    /usr/lib/libSystem.B.dylib
  0x000000000571c000    /usr/lib/libobjc.A.dylib
  0x000000000571c000    /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
  0x000000000571c000    /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation
  0x000000000571c000    /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit
  0x000000000571c000    /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData
  0x000000000571c000    /System/Library/PrivateFrameworks/RemoteViewServices.framework/Versions/A/RemoteViewServices
  0x000000000571c000    /System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox
  0x000000000571c000    /System/Library/Frameworks/AudioUnit.framework/Versions/A/AudioUnit
  0x000000000571c000    /System/Library/PrivateFrameworks/DataDetectorsCore.framework/Versions/A/DataDetectorsCore
  0x000000000571c000    /System/Library/PrivateFrameworks/DesktopServicesPriv.framework/Versions/A/DesktopServicesPriv
  0x000000000571c000    /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox
  0x000000000571c000    /System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore
  0x000000000571c000    /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SpeechRecognition.framework/Versions/A/SpeechRecognition
  0x000000000571c000    /usr/lib/libauto.dylib
  0x000000000571c000    /usr/lib/libicucore.A.dylib
  0x000000000571c000    /usr/lib/libxml2.2.dylib
  0x000000000571c000    /System/Library/PrivateFrameworks/CoreUI.framework/Versions/A/CoreUI
  0x000000000571c000    /System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio
  0x000000000571c000    /System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration
  0x000000000571c000    /usr/lib/liblangid.dylib
  0x000000000571c000    /System/Library/PrivateFrameworks/MultitouchSupport.framework/Versions/A/MultitouchSupport
  0x000000000571c000    /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit
  0x000000000571c000    /usr/lib/libDiagnosticMessagesClient.dylib
  0x000000000571c000    /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices
  0x000000000571c000    /System/Library/PrivateFrameworks/PerformanceAnalysis.framework/Versions/A/PerformanceAnalysis
  0x000000000571c000    /System/Library/PrivateFrameworks/GenerationalStorage.framework/Versions/A/GenerationalStorage
  0x000000000571c000    /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL
  0x000000000571c000    /System/Library/PrivateFrameworks/Sharing.framework/Versions/A/Sharing
  0x000000000571c000    /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
  0x000000000571c000    /System/Library/Frameworks/CoreText.framework/Versions/A/CoreText
  0x000000000571c000    /System/Library/Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics
  0x000000000571c000    /System/Library/PrivateFrameworks/Backup.framework/Versions/A/Backup
  0x000000000571c000    /System/Library/Frameworks/CFNetwork.framework/Versions/A/CFNetwork
  0x000000000571c000    /System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration
  0x000000000571c000    /usr/lib/libCRFSuite.dylib
  0x000000000571c000    /usr/lib/libc++.1.dylib
  0x000000000571c000    /usr/lib/libc++abi.dylib
  0x000000000571c000    /usr/lib/system/libcache.dylib
  0x000000000571c000    /usr/lib/system/libcommonCrypto.dylib
  0x000000000571c000    /usr/lib/system/libcompiler_rt.dylib
  0x000000000571c000    /usr/lib/system/libcopyfile.dylib
  0x000000000571c000    /usr/lib/system/libcorecrypto.dylib
  0x000000000571c000    /usr/lib/system/libdispatch.dylib
  0x000000000571c000    /usr/lib/system/libdyld.dylib
  0x000000000571c000    /usr/lib/system/libkeymgr.dylib
  0x000000000571c000    /usr/lib/system/liblaunch.dylib
  0x000000000571c000    /usr/lib/system/libmacho.dylib
  0x000000000571c000    /usr/lib/system/libquarantine.dylib
  0x000000000571c000    /usr/lib/system/libremovefile.dylib
  0x000000000571c000    /usr/lib/system/libsystem_asl.dylib
  0x000000000571c000    /usr/lib/system/libsystem_blocks.dylib
  0x000000000571c000    /usr/lib/system/libsystem_c.dylib
  0x000000000571c000    /usr/lib/system/libsystem_configuration.dylib
  0x000000000571c000    /usr/lib/system/libsystem_dnssd.dylib
  0x000000000571c000    /usr/lib/system/libsystem_info.dylib
  0x000000000571c000    /usr/lib/system/libsystem_kernel.dylib
  0x000000000571c000    /usr/lib/system/libsystem_m.dylib
  0x000000000571c000    /usr/lib/system/libsystem_malloc.dylib
  0x000000000571c000    /usr/lib/system/libsystem_network.dylib
  0x000000000571c000    /usr/lib/system/libsystem_notify.dylib
  0x000000000571c000    /usr/lib/system/libsystem_platform.dylib
  0x000000000571c000    /usr/lib/system/libsystem_pthread.dylib
  0x000000000571c000    /usr/lib/system/libsystem_sandbox.dylib
  0x000000000571c000    /usr/lib/system/libsystem_stats.dylib
  0x000000000571c000    /usr/lib/system/libunc.dylib
  0x000000000571c000    /usr/lib/system/libunwind.dylib
  0x000000000571c000    /usr/lib/system/libxpc.dylib
  0x000000000571c000    /usr/lib/libbsm.0.dylib
  0x000000000571c000    /usr/lib/libsqlite3.dylib
  0x000000000571c000    /usr/lib/libxar.1.dylib
  0x000000000571c000    /usr/lib/libpam.2.dylib
  0x000000000571c000    /usr/lib/libOpenScriptingUtil.dylib
  0x000000000571c000    /usr/lib/libbz2.1.0.dylib
  0x000000000571c000    /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonCore.framework/Versions/A/CarbonCore
  0x000000000571c000    /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Metadata.framework/Versions/A/Metadata
  0x000000000571c000    /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/OSServices.framework/Versions/A/OSServices
  0x000000000571c000
  0x000000000571c000    /System/Library/Frameworks/DirectoryService.framework/Versions/A/DirectoryService
  0x000000000571c000    /System/Library/PrivateFrameworks/DiskImages.framework/Versions/A/DiskImages
  0x000000000571c000    /System/Library/PrivateFrameworks/LoginUIKit.framework/Versions/A/Frameworks/LoginUICore.framework/Versions/A/LoginUICore
  0x000000000571c000    /usr/lib/libCoreStorage.dylib
  0x000000000571c000    /usr/lib/libcsfde.dylib
  0x000000000571c000    /usr/lib/libodfde.dylib
  0x000000000571c000    /System/Library/Frameworks/DiscRecording.framework/Versions/A/DiscRecording
  0x000000000571c000    /usr/lib/libcurl.4.dylib
  0x000000000571c000    /System/Library/PrivateFrameworks/MediaKit.framework/Versions/A/MediaKit
  0x000000000571c000    /System/Library/PrivateFrameworks/EFILogin.framework/Versions/A/EFILogin
  0x000000000571c000    /usr/lib/libutil.dylib
  0x000000000571c000    /System/Library/PrivateFrameworks/AOSNotification.framework/Versions/A/AOSNotification
  0x000000000571c000    /System/Library/Frameworks/LDAP.framework/Versions/A/LDAP
  0x000000000571c000    /usr/lib/libsasl2.2.dylib
  0x000000000571c000    /usr/lib/libcrypto.0.9.8.dylib
  0x000000000571c000    /usr/lib/libssl.0.9.8.dylib
  0x00000001200d4000    /Library/Java/JavaVirtualMachines/jdk1.7.0_60.jdk/Contents/Home/jre/lib/libfontmanager.dylib
  0x000000012013b000    /Users/hangtime/Documents/games/pong-the-moba/lib/natives/liblwjgl.jnilib
  0x000000011d40c000    /Library/Java/JavaVirtualMachines/jdk1.7.0_60.jdk/Contents/Home/jre/lib/libjawt.dylib
  0x000000000571c000    /System/Library/Frameworks/OpenGL.framework/Versions/A/Resources/GLEngine.bundle/GLEngine
  0x000000000571c000    /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLProgrammability.dylib
  0x0000000000000000    /System/Library/Extensions/AppleIntelHD4000GraphicsGLDriver.bundle/Contents/MacOS/AppleIntelHD4000GraphicsGLDriver
  0x000000000571c000    /System/Library/PrivateFrameworks/IOAccelerator.framework/Versions/A/IOAccelerator
  0x000000000571c000    /System/Library/PrivateFrameworks/GPUSupport.framework/Versions/A/Libraries/libGPUSupportMercury.dylib
  0x0000000000000000    /System/Library/Extensions/GeForceGLDriver.bundle/Contents/MacOS/GeForceGLDriver
  0x000000000571c000    /System/Library/Extensions/GeForceGLDriver.bundle/Contents/MacOS/libclh.dylib
  0x000000000571c000    /System/Library/Frameworks/OpenGL.framework/Versions/A/Resources/GLRendererFloat.bundle/GLRendererFloat
  0x000000000571c000    /System/Library/Frameworks/OpenCL.framework/Versions/A/Libraries/libcldcpuengine.dylib

  VM Arguments:
  jvm_args: -Djava.library.path=lib/natives -Didea.launcher.port=7533 -Didea.launcher.bin.path=/Applications/IntelliJ IDEA 13 CE.app/bin -Dfile.encoding=UTF-8
  java_command: com.intellij.rt.execution.application.AppMain pong.Pong
  Launcher Type: SUN_STANDARD

  Environment Variables:
  PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
  SHELL=/bin/bash

  Signal Handlers:
  SIGSEGV: [libjvm.dylib+0x52b7b1], sa_mask[0]=0xfffefeff, sa_flags=0x00000043
  SIGBUS: [libjvm.dylib+0x52b7b1], sa_mask[0]=0xfffefeff, sa_flags=0x00000042
  SIGFPE: [libjvm.dylib+0x41e28a], sa_mask[0]=0xfffefeff, sa_flags=0x00000042
  SIGPIPE: [libjvm.dylib+0x41e28a], sa_mask[0]=0xfffefeff, sa_flags=0x00000042
  SIGXFSZ: [libjvm.dylib+0x41e28a], sa_mask[0]=0xfffefeff, sa_flags=0x00000042
  SIGILL: [libjvm.dylib+0x41e28a], sa_mask[0]=0xfffefeff, sa_flags=0x00000042
  SIGUSR1: SIG_DFL, sa_mask[0]=0x00000000, sa_flags=0x00000002
  SIGUSR2: [libjvm.dylib+0x41dd7c], sa_mask[0]=0x00000004, sa_flags=0x00000042
  SIGHUP: [libjvm.dylib+0x41c00b], sa_mask[0]=0xfffefeff, sa_flags=0x00000042
  SIGINT: [libjvm.dylib+0x41c00b], sa_mask[0]=0xfffefeff, sa_flags=0x00000042
  SIGTERM: [libjvm.dylib+0x41c00b], sa_mask[0]=0xfffefeff, sa_flags=0x00000042
  SIGQUIT: [libjvm.dylib+0x41c00b], sa_mask[0]=0xfffefeff, sa_flags=0x00000042

  ---------------  S Y S T E M  ---------------

  OS:Bsduname:Darwin 13.2.0 Darwin Kernel Version 13.2.0: Thu Apr 17 23:03:13 PDT 2014; root:xnu-2422.100.13~1/RELEASE_X86_64 x86_64
  rlimit: STACK 8192k, CORE 0k, NPROC 709, NOFILE 10240, AS infinity
  load average:4.00 3.05 3.34

  CPU:total 8 (4 cores per cpu, 2 threads per core) family 6 model 58 stepping 9, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt, avx, aes, erms, ht, tsc, tscinvbit, tscinv

  Memory: 4k page, physical 16777216k(4194304k free)

  /proc/meminfo:

  vm_info: Java HotSpot(TM) 64-Bit Server VM (24.60-b09) for bsd-amd64 JRE (1.7.0_60-b19), built on May  7 2014 12:52:25 by "java_re" with gcc 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)

  time: Wed Jul  2 14:09:34 2014
  elapsed time: 1 seconds


text:
Q: How do I Manage Communities since Spring '15 release? Last week, I could do: Setup > Customize > Communities > All Communities, and change tabs etc.
Now, the action links are missing from the view of all communities:

I've checked all the permissions are present on my custom profile, like Manage Communities:

But interestingly, editing the vanilla System Administrator profile shows that to be disabled!

I know there were a couple profile and permission splits and changes with the recent release. And there is some interesting language in the implementation PDF on printed page number 36:

USER PERMISSIONS To access Community Management:

*

*"Manage Communities" OR "Create and Set Up Communities"

*AND is a member of the community whose Community Management page they're trying to access

If that checkbox is greyed out, how do admins manage communities now?

A: This may help
https://help.salesforce.com/HTViewSolution?id=000212095
Seems like a bug to me


text:
Q: How to create a symbolic link with short fullpath? I am editing paths on some binaries short of recompiling them.
I want to replace /lib/ld-linux-armhf.so.3, which I cannot create, by a path of same length, that I can create without rooting the phone. It should be something of the same length because I am editing binaries. I have chosen the path /data/data/com.clk/.so.3, after the different possibilities listed below. What I'm trying to do is create /data/data/com.clk/.so.3, which should be a symbolic link to /data/data/com.spartacusrex.spartacuside/gentoo_armv6l/lib/ld-linux-armhf.so.3
I initially used /proc/5781/cwd/rmhf.so.3, but this is not readable by other applications (which are other linux accounts).
I then tried /data/.tmp, but it is specific to my phone, and not documented according to @ChrisStratton. Same about /data/logcat_log.
/sdcard is excluded because fuse options rw,nosuid,nodev,relatime,user_id=1015,group_id=1015,default_permissions,allow_other restrict links and exectuables and /lib/ld-linux-armhf.so.3 is to be executed.
Does anyone know how else I can accomplish this?

A: Have you considered using PatchELF rather than rolling your own binary editing? It claims to be smart enough to insert an extra page into the ELF header as needed to make room for longer interpreter or RPATH fields. That would allow you to use the real interpreter value rather than needing a symbolic link.

A: I finally stumbled on a apk, AIDE, that can create simple apk, which does not need any x86 computer and works on the phone itself. Without paying anything, in twenty minutes, I created my first apk, and was able to install it after temporarily authorizating unknown sources. That was my first java program. I chose a short albeit informative name for the apk, com.symli (com. seemed necessary).
Then I modified the tab MainActivity.java of the editor to get:
package com.symli;

import android.app.*;
import android.os.*;

public class MainActivity extends Activity
{
  @Override
  protected void onCreate(Bundle savedInstanceState)
  {
    try
    {
      Runtime.getRuntime().exec("ln -s /data/data/com.termux/com.symli /data/data/com.symli/n");
      Runtime.getRuntime().exec("chmod 1777 /data/data/com.symli");
    } catch (java.io.IOException e) {
    }
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);
  }
}

Then I simply clicked on the "run" button, and BOOM the symlink is now here for good, and /data/data/com.symli is itself a world writable directory (with sticky bit set):
lrwxrwxrwx 1 10150 10150 50 Nov  3 13:17 /data/data/com.symli/n -> /data/data/com.termux/com.symli
drwxrwxrwt 4 10150 10150 4096 Nov  3  2015 /data/data/com.symli

I have uploaded the resulting .apk to http://sf.net/projects/gentooandroid/files/symlinksForStackoverflowQuestion20459834v2.apk/download (permissions: NONE ! SHA256sum: 01fd17a8700f2cb5b5bb943b38b623b1400679fa03c35ccb204619d1d5d486ff MD5sum: 879af0633504ab25462a1f9b2303587e)


text:
Q: Creating procedure or function in Ada task I am creating the following task in Ada and I want it to contain a procedure that tells me the count of my buffer. How can I do that?
package body Buffer is

  task body Buffer is

    size: constant := 10000; -- buffer capacity
    buf: array(1.. size) of Types.Item;
    count: integer range 0..size := 0;
    in_index,out_index:integer range 1..size := 1;

  begin
    procedure getCount(currentCount: out Integer) is
    begin
      currentCount := count;
    end getCount;

    loop
      select
        when count<size =>
          accept put(item: in Types.Item) do
            buf(in_index) := item;
          end put;
          in_index := in_index mod size+1;
          count := count + 1;
        or
          when count>0 =>
            accept get(item:out Types.Item) do
              item := buf(out_index);
            end get;
            out_index := out_index mod size+1;
            count := count - 1;
        or
          terminate;
      end select;
    end loop;
  end Buffer;

end Buffer;

When I compile this code I get an error that

declarations must come before "begin"

referring to the definition of the getCount procedure.

A: The immediate problem is that you have specified a subprogram body without having first specified a corresponding subprogram declaration in the handled sequence of statements part of your task body. It should go in the declarative part, as shown here.
The larger problem appears to be creating a bounded buffer, for which a protected type seems more suitable. Examples may be found in §II.9 Protected Types and §9.1 Protected Types. In protected type Bounded_Buffer, you could add a
function Get_Count return Integer;

having a body like this:
function Get_Count return Integer is
begin
   return Count;
end Get_Count;

A: A declaration must come before "begin", and your declaration of "getCount" is following the "begin". Relocate it:
procedure getCount(currentCount: out Integer) is
begin
    currentCount := count;
end getCount;

begin

But really, pay attention to trashgod's advice.


text:
Q: React Native: обновление экрана с данными при загрузке БД - как? Всем здравствуйте!
Впервые делаю приложение на React Native и не соображу, как сделать следующее (использую модуль @react-navigation для роутинга между экранами): загружаю БД на одном экране и хочу, чтобы полученные данные отобразились на другом (второй экран перерендерился с новыми данными). Данные в БД загружаются успешно, но не отображаются до релога приложения, т.е. повторного рендера не происходит. Если его закрыть и открыть заново, или пересобрать, всё отображается. Можно как-то принудительно вызвать повторный рендер? Из идей только принудительная повторная загрузка всего приложения, но это ресурсозатратно и не оправдано. UseContext тоже так себе идея. В общем, я в тупике и буду благодарна помощи.
P.S. использую Expo.

A: В документации @react-navigation есть замечательный раздел, под названием Passing parameters to routes. Там сказано, что мы можем передавать параметры на целевой экран вместе с методом navigate. Конструкция имеет следующий вид: navigation.navigate('RouteName', { /* params go here */ }) .
То есть, вы дополнительных параметрах вы указываете список полей, которые хотите передать на другой экран. Дальше нужно только принять эти параметры на другом экране.
function AnotherScreen({ route, navigation }) {
 const { param1, otherParam...n } = route.params;
 return param1
};

Далее используйте эти параметры так, как вам нужно.

A: Задала вопрос и вскорости нашла на него ответ: в моем случае помог useIsFocused из react-navigation.


text:
Q: On click suggestions don't replace the good value in text box Basically, I have a search box that suggests results from a database as user types. It looks like this :
Example
.
I use ajax in a file to make a live search as user types :
<input name="estab" id="estab" type="text" class="estab" />

";
    echo "
$value
";
}
echo '
';

My problem is : when i click on any of the suggestion, it is always the last option that is replaced in the text box, in this case "University of Washington".
I have been trying to solve that problem for 2 days now and I can't find the solution.
Any help would be greatly appreciated. Thanks
UPDATE
Found the solution, if someone is interested, here's what I did in res.php:
while($result=$data->fetch_assoc()){
?>
<li onclick='fill("<?php echo $result['school']; ?>")'><?php echo $result['school'];?>

<?php
}
?>

and in the first file :

A: I wouldn't use the onclick method here. I would use jQuery to assign the events to your list items. But if you must, in your onclick method, try passing this.value like so:

$value

Then your fill() method could be something like so:
function fill(val){
    $('#estab').val(val);
    $('#result').hide();
}

EDIT: You are mixing plain JavaScript and jQuery code. I replaced your plain JS line with the jQuery equivalent.
Also, if you are adding the fill() method in the same loop that adds the LIs, then you are adding multiple fill methods, which is incorrect. Just add it once in the same script tag like below.
";

echo '
';
foreach($sortie2 as $value){
    echo "
$value
";
}
echo '
';


text:
Q: how to extract '\+' in string of '\+234' in python3 I have a string of str = '\+234', from which I would like to create another string of '\\+'. And the statement '\' + str[1]  gives the following error:

SyntaxError: EOL while scanning string literal

But the str[1] is '+'. Why the two characters cannot be joined?

A: Because \ is an escape character in python. Try '\\'+str[1]

A: That's because "\" is an escaping char.
Try to use double \ instead.


text:
Q: Python UDP client-server with different matching incoming-outgoing ports Based on the example at http://www.binarytides.com/programming-udp-sockets-in-python/ I modified it to run on python 3 and used two opposed ports on client and server, so replies from each one go to these ports. Here are my examples
Server:
'''
    Simple udp socket server
'''

import socket
import sys

HOST = 'localhost'
PORT_IN = 8889  # Arbitrary non-privileged port
PORT_OUT = 8888

# Datagram (udp) socket
try :
    s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
    print('Socket created')
except socket.error as e:
    print(e)
    sys.exit()

# Bind socket to local host and port
try:
    s.bind((HOST, PORT_IN))
except socket.error as e:
    print(e)
    sys.exit()

print('Socket bind complete')

#now keep talking with the client
while 1:
    # receive data from client (data, addr)
    d = s.recvfrom(1024)
    data = d[0]
    addr = d[1]

    if not data:
        break

    reply = 'OK...' + str(data)

    s.sendto(reply.encode('UTF-8'), ('localhost', PORT_OUT))
    print('Message[' + addr[0] + ':' + str(addr[1]) + '] - ' + str(data).strip())

s.close()

Client:
'''
    udp socket client
    Silver Moon
'''

import socket   #for sockets
import sys  #for exit

# create dgram udp socket
try:
    s1 = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
    s2 = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
except socket.error:
    print('Failed to create socket')
    sys.exit()

host = 'localhost'
port_out = 8889
port_in = 8888

counter = 0
while(1) :
    # msg = b'aoua'
    msg = 'aoua' + str(counter)

    try :
        #Set the whole string
        s1.sendto(msg.encode('UTF-8'), (host, port_out))

        # receive data from client (data, addr)
        s2.bind(('localhost', port_in))
        d = s2.recvfrom(1472)
        reply = d[0]
        addr = d[1]

        print('Server reply : ' + str(reply))

    except socket.error as e:
        print(e)
        # sys.exit()
    counter += 1

Problem is with the client which cannot receive any response from server and d = s2.recvfrom(1472) hangs with error [WinError 10022] An invalid argument was supplied.
I've noticed a slightly different behaviour with sock.settimeout(seconds), but I really can't figure why. Isn't d = s2.recvfrom(buffer) supposed to wait for incoming data?
What am I missing here?

A: Damn... Just saw it. Silly mistake. Calling s2.bind(('localhost', port_in)) in Client inside the loop.


text:
Q: Compiling sass with npm scripts - node-sass returns EISDIR: illegal operation on a directory Following this writeup I am trying to write a script to compile my sass into css using node-sass.
This is my package.json scripts part:
  "scripts" : {
    "prestart" : "babel-node tools/startMessage.js",
    "start" : "npm-run-all --parallel open:src lint:watch sass:watch test:watch",
    "open:src": "babel-node tools/srcServer.js",
    "lint": "node_modules/.bin/esw webpack.config.* src tools",
    "lint:watch": "npm run lint -- --watch",
    "sass": "node-sass src/assets/**/*.scss src/assets/css",
    "sass:watch": "npm run sass -- --watch",
    "test:watch": "npm run test -- --watch",
    "test": "mocha --reporter progress tools/testSetup.js \"src/**/*.test.js\""
  },

now when I run npm run sass trough the terminal I get the following message:

Introduction@1.0.0 sass /Users/shooshte/PersonalProjects/introductionReact
    node-sass src/assets/**/*.scss src/assets/css

Rendering Complete, saving .css file... Error: EISDIR: illegal
  operation on a directory, open
  '/Users/shooshte/PersonalProjects/introductionReact/src/assets/css'

Both of the directories are created. What am I doing wrong?
If you need more info, just comment or you can also view the GitHub repo.
Thanks for the help.

A: EISDIR means you are trying to run an operation on a file, but you gave a directory (folder).
"sass": "node-sass src/assets/**/*.scss src/assets/css/*.css"

update the code to target a .css file instead of a folder.


text:
Q: Symfony2 Twig and boolean false I try to generate URL with Twig in my Symfony2 project.
My URL take Boolean as parameters, when I put True in the twig it's work but when I put false an error is throw.

An exception has been thrown during the rendering of a template
  ("Parameter "boolean" for route "route_1" must match "[^/]++" (""
  given).

{{ path('route_1', {'id': item.id, 'boolean': false }) }}

I haven't any requirement on this parameter.
    /**
     * @Route("route1-{id}/boolean{boolean}", requirements={"id" = "\d+"}, name="route_1")
     */
    public function Route1Action($id, $boolean, Request $request) {
         //Some stuff
    }

Edit
So, use Boolean in URL is bad. I put number and php convert automatically in boolean. 0 is false and all other numbers is true.
<?php
var_dump((bool) "");        // bool(false)
var_dump((bool) 1);         // bool(true)
var_dump((bool) -2);        // bool(true)
var_dump((bool) "foo");     // bool(true)
var_dump((bool) 2.3e5);     // bool(true)
var_dump((bool) array(12)); // bool(true)
var_dump((bool) array());   // bool(false)
var_dump((bool) "false");   // bool(true)
?>

http://php.net/manual/en/language.types.boolean.php
With this code it's work :
Action :
/**
 * @Route("route1-{id}/boolean{boolean}", requirements={"id" = "\d+", "boolean" = "\d+"}, name="route_1")
 */
public function Route1Action($id, $boolean, Request $request) {
     //Some stuff
}

The url to generate :
{{ path('route_1', {'id': item.id, 'boolean': 0 }) }} //To send false
{{ path('route_1', {'id': item.id, 'boolean': 1 }) }} //To send true (1 or any other numbers)

Thanks for your help. :)

A: It kind of depends on what exactly you want to have in the URL. Boolean variables are generally not a good idea, since URL is a string.
Will the boolean variable be represented as true or as 1 ?
{{ path('route_1', {'id': item.id, 'boolean': 'false' }) }}

or
{{ path('route_1', {'id': item.id, 'boolean': 1 }) }}

You also should specify the requirements for the argument, in that case I can sent anything.
Anyway, you should pass always text-representable variables like numeric types or text.

A: Link


text:
Q: C# Double Clicking DataGridView vs Scroll Bar Issue Opening Duplicate Records I am working on a WPF C# Application that includes a DataGridView with a Scroll Bar. I have written code so thatwhenever a row is selected it opens up the record. However, I noticed that when clicking on the scroll bar my application also registered this as a click event and was opening duplicate copies of the same record whenever the user double clicked on the scroll bar.
To prevent this I wrote code so that if the user opens the same record it does not open. The user has to click on another record, so they can open the same one after closing the record. This issue is a little annoying for the users, so I am trying to come up with a better solution.
At the moment I am using the MouseDoubleClicked Event Handler. Has anyone come across this issue before?

A: Sounds like you need MouseDoubleClicked on the row, not the data grid itself.
<DataGrid>
    <DataGrid.RowStyle>
        <Style TargetType="DataGridRow" BasedOn="{StaticResource {x:Type DataGridRow}}">
            <EventSetter Event="MouseDoubleClick" Handler="DataGridRow_MouseDoubleClick" />
        </Style>
    </DataGrid.RowStyle>
</DataGrid>

Note that if you're using alternative theme(s), you'd have to change the "BasedOn" property to whatever DataGridRow style that is offered by the theme, otherwise you'd lose the row style which includes at least the background for row selection and may appear to be unselectable.


text:
Q: Transposing Data in Pandas I have an excel file that contains a count of how many times an Part has been used during its lifespan. The data is currently stored in such a way that the Serial numbers are in Column A, and each "Lifespan" Count is stored in adjacent columns, with a "Date" value as its heading.
Here is an example:
Image1
I want to be able to pivot/transpose ALL of the Date columns in Python so that the output is in the following format with the Lifespan Count as a new column named "Count":
Image2
I've tried using the pivot function in pandas to flip the appropriate rows & columns around, however the problem is that I'd have to define each column one at a time. The nature of the spreadsheet used in this example is just one of several spreadsheets I use that all start at a different Date (some start at 01/01/2010 to present while others start at 01/01/1999 to present). It is worth noting that all spreadsheets start at the first of every month and increment 1 month at a time.
Therefore is there a way I can just select ALL the columns I've loaded into a Dataframe via the spreadsheet loaded to be able to Pivot/Transpose the data as mentioned?
pivot = df.pivot_table(index=['Serial'], values=['01/01/2019','01/02/2019',... etc], aggfunc='max'])

A: Simple use of stack() if you have named your column series and have set_index() on your rows.
import datetime as dt
import random
df = pd.DataFrame({**{"Serial":[s for s in range(1111,1121)]},
 **{d:[random.randint(0,150) for i in range(10)] for d in pd.date_range(start=dt.date(2019,1,1), end=dt.date(2019,1,6))}
}).set_index("Serial")
df.columns.set_names("Date", inplace=True)
dfs = df.stack().to_frame().rename(columns={0:"Count"})

print(f"{df.iloc[:,:3].to_string()}\n\n{dfs.iloc[:10].to_string()}")

sample output
Date    2019-01-01 00:00:00  2019-01-02 00:00:00  2019-01-03 00:00:00
Serial
1111                    134                   76                    8
1112                    115                   37                    8
1113                     16                   23                  130
1114                    108                   45                   69
1115                      0                   51                  111
1116                     51                   71                  101
1117                    107                   10                  142
1118                     80                   48                  134
1119                    148                   62                   75
1120                      4                  135                  100

                            Count
Serial Date
1111   2019-01-01 00:00:00    134
       2019-01-02 00:00:00     76
       2019-01-03 00:00:00      8
       2019-01-04 00:00:00     16
       2019-01-05 00:00:00    140
       2019-01-06 00:00:00     28
1112   2019-01-01 00:00:00    115
       2019-01-02 00:00:00     37
       2019-01-03 00:00:00      8
       2019-01-04 00:00:00     56