unified_texts
stringlengths
32
30.1k
OpenStatus_id
int64
0
4
input_ids
list
token_type_ids
list
attention_mask
list
ActionMode refuses to start === So, I have a ListFragment, and I've implemented `ActionMode.Callback` into that list fragment. Rather than try to fuss around with LongClick listeners, I decided to place the `startActionMode()` method in `OnListItemClick`. The only problem is that while the list items are clickable (the log is showing items being clicked), the ActionMode isn't starting. Can anyone help me figure out why? Here's my implementation: public void onListItemClick(ListView l, View v, int position, long id){ //editAlarm(id); Log.i("NagTasksDateTimeListFragment", "User clicked on "+id); if (mActionMode != null) { mActionMode = getSherlockActivity().startActionMode(this); } if (l.getSelectedView() == v) { v.setSelected(false); mActionMode.finish(); mActionMode = null; idForActionMode = -1; //global parameter } else if (l.getSelectedView() != null) { l.getSelectedView().setSelected(false); v.setSelected(true); idForActionMode = id; //Log.i("NagTasksDateTimeListFragment", "selectedItemID = "+l.getSelectedItemId()); } else { idForActionMode = id; v.setSelected(true); //Log.i("NagTasksDateTimeListFragment", "selectedItemID = "+l.getSelectedItemId()); } } So, how my implementation is supposed to work is that if a user clicks on a selected item, it deselects it and ends the `ActionMode`, and since the `ListView` is set to single selection mode (for backwards compatibility reasons) clicking on another item in the list would deselect the first item and select the new one. Instead, what happens is nothing. So, why nothing?
0
[ 2, 1028, 15570, 10864, 20, 799, 800, 3726, 3726, 86, 15, 31, 57, 21, 968, 22133, 1130, 15, 17, 31, 22, 195, 6807, 13, 1, 8645, 15570, 9, 9200, 1958, 1, 77, 30, 968, 14847, 9, 864, 119, 1131, 20, 20053, 140, 29, 175, 150, 10129...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to implement a doubly linked list? === We learned how to implement singly linked list in class. And our professor kind of mentioned us doing doubly linked list, but apparently its so easy that he really didn't explain how to do it in full detail. I'm really good at with working with singly linked list, but could someone tell me how to make a doubly linked list?
0
[ 2, 184, 20, 8713, 21, 13, 7663, 8818, 4727, 968, 60, 800, 3726, 3726, 95, 2691, 184, 20, 8713, 4481, 102, 4727, 968, 19, 718, 9, 17, 318, 1032, 825, 16, 2211, 182, 845, 13, 7663, 8818, 4727, 968, 15, 47, 3083, 82, 86, 2010, 30...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
how to identify changed row in editable grid in lightswitch C# === I have a editable grid for invoices and few checkbox column like invoice sent to customer / ok to invoice.I have fields updated by/updated on for these boolean fields. I want to update these two columns if checkboxes values has been changed.I am not sure how can I do this.Any help??
0
[ 2, 184, 20, 5808, 1015, 3131, 19, 9392, 579, 7354, 19, 3411, 15915, 272, 5910, 800, 3726, 3726, 31, 57, 21, 9392, 579, 7354, 26, 19, 13379, 18, 17, 310, 2631, 5309, 4698, 101, 19, 13379, 795, 20, 7705, 13, 118, 5854, 20, 19, 133...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Binding value to not first argument === I have a class named "Person" Person :: String -> String -> Int -> Gender -> Person **Goal:** To make a more general version of Person, the femalePerson by assigning Gender to Female. **What works:** Binding first N elements works: let personsWithNameAlice = Person "Alice" let personsWithNameAliceMcGee = Person "Alice" "McGee" **What doesn't work:** let femalePerson = Person {gender = Female} **Question:** - How do i do THIS? - How do i a bind a value to n-th element of any function where n != 0?
0
[ 2, 8728, 1923, 20, 52, 64, 5476, 800, 3726, 3726, 31, 57, 21, 718, 377, 13, 7, 7276, 7, 840, 13, 45, 45, 3724, 13, 8, 1, 3724, 13, 8, 1, 19, 38, 13, 8, 1, 4552, 13, 8, 1, 840, 13, 1409, 839, 192, 45, 1409, 20, 233, 21,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to get count of every items of an array using Jquery === I have jquery array as follows, var arr = ['ab','pq','mn','ab','mn','ab'] Expected result arr['ab'] = 3 arr['pq'] = 1 arr['mn'] = 2
0
[ 2, 184, 20, 164, 2468, 16, 352, 3755, 16, 40, 7718, 568, 487, 8190, 93, 800, 3726, 3726, 31, 57, 487, 8190, 93, 7718, 28, 2415, 15, 4033, 13, 20870, 800, 636, 22, 2297, 22, 15, 22, 306, 1251, 22, 15, 22, 79, 103, 22, 15, 22,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
repeater with postback === I have a repeater, each item have a check box and radio button. -the checkbox disable all the controls inside the item when checked (with auto post back) -the radio button display a popup once checked (also with auto post back). The case is: if there is a radio button checked in any item of the repeater, the popup will display when I check the checkbox control to disable an item, due to post back will find a checked radio button so it will run the display command again. How can I prevent this? Checkbox should only disable the item not to display the popup. MY code protected void Page_Load(object sender, EventArgs e) { } protected void rptr1_ItemDataBound(object sender, RepeaterItemEventArgs e) { if (e.Item.ItemType == ListItemType.AlternatingItem || e.Item.ItemType == ListItemType.Item) { Label lbl1 = (Label)e.Item.FindControl("lbl_dg_task"); Label lbl2 = (Label)e.Item.FindControl("lbl_dg_seq"); CheckBox chb = (CheckBox)e.Item.FindControl("chkb_NO"); RadioButton l1 = (RadioButton)e.Item.FindControl("L1"); RadioButton l2 = (RadioButton)e.Item.FindControl("L2"); RadioButton l3 = (RadioButton)e.Item.FindControl("L3"); RadioButton l4 = (RadioButton)e.Item.FindControl("L4"); RadioButton r1 = (RadioButton)e.Item.FindControl("R1"); RadioButton r2 = (RadioButton)e.Item.FindControl("R2"); RadioButton r3 = (RadioButton)e.Item.FindControl("R3"); RadioButton r4 = (RadioButton)e.Item.FindControl("R4"); AjaxControlToolkit.ModalPopupExtender mpex = (AjaxControlToolkit.ModalPopupExtender)e.Item.FindControl("mpe1"); if (l1.Checked) { //pop.Enabled = true; ModalPopupExtender1.Show(); } if (chb.Checked == true) { l1.Enabled = false; l2.Enabled = false; l3.Enabled = false; l4.Enabled = false; r1.Enabled = false; r2.Enabled = false; r3.Enabled = false; r4.Enabled = false; lbl1.CssClass = "grayedout"; lbl2.CssClass = "grayedout"; } else { l1.Enabled = true; l2.Enabled = true; l3.Enabled = true; l4.Enabled = true; r1.Enabled = true; r2.Enabled = true; r3.Enabled = true; r4.Enabled = true; lbl1.CssClass = "seq"; lbl2.CssClass = "task"; } } } protected void rptr1_PreRender(object sender, EventArgs e) { foreach (RepeaterItem item in rptr1.Items) { if (item.ItemType == ListItemType.AlternatingItem || item.ItemType == ListItemType.Item) { CheckBox chb = (CheckBox)item.FindControl("chkb_NO"); Label lbl1 = (Label)item.FindControl("lbl_dg_task"); Label lbl2 = (Label)item.FindControl("lbl_dg_seq"); RadioButton l1 = (RadioButton)item.FindControl("L1"); RadioButton l2 = (RadioButton)item.FindControl("L2"); RadioButton l3 = (RadioButton)item.FindControl("L3"); RadioButton l4 = (RadioButton)item.FindControl("L4"); RadioButton r1 = (RadioButton)item.FindControl("R1"); RadioButton r2 = (RadioButton)item.FindControl("R2"); RadioButton r3 = (RadioButton)item.FindControl("R3"); RadioButton r4 = (RadioButton)item.FindControl("R4"); AjaxControlToolkit.ModalPopupExtender mpex = (AjaxControlToolkit.ModalPopupExtender)item.FindControl("ModalPopupExtender1"); if (chb.Checked == true) { l1.Enabled = false; l2.Enabled = false; l3.Enabled = false; l4.Enabled = false; r1.Enabled = false; r2.Enabled = false; r3.Enabled = false; r4.Enabled = false; l1.Checked = false; lbl1.CssClass = "grayedout"; lbl2.CssClass = "grayedout"; } else { l1.Enabled = true; l2.Enabled = true; l3.Enabled = true; l4.Enabled = true; r1.Enabled = true; r2.Enabled = true; r3.Enabled = true; r4.Enabled = true; lbl1.CssClass = "seq"; lbl2.CssClass = "task"; } if (l1.Checked) { //pop.Enabled = true; ModalPopupExtender1.Show(); } } } }
0
[ 2, 6830, 106, 29, 678, 1958, 800, 3726, 3726, 31, 57, 21, 6830, 106, 15, 206, 9101, 57, 21, 2631, 1649, 17, 603, 5167, 9, 13, 8, 124, 2631, 5309, 1460, 579, 65, 14, 8671, 572, 14, 9101, 76, 6505, 13, 5, 1410, 3108, 678, 97, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Winsock send fails with error 10093 === I am writing a bittorrent client and need to contact multiple trackers over a tcp connection. In order to do this I wrote a winsock wrapper class shown below: class trackerSocket{ public: ~trackerSocket(); int trackerInitialize(string address); int trackerSend(string getParams); int trackerRecv(); be_node *responseDict; bool working; private: string address; string port; string protocol; string page; SOCKET ConnectSocket; int parseAnnounce(string announce); int parseTrackerResponse(string response); }; The program starts by assigning a new trackerSocket class to a variable. The trackerInitialize function is called on this function and if successful, the class is pushed onto a vector to store all the working trackers. Here is the trackerInitialize function: int trackerSocket::trackerInitialize(string announce){ WSADATA wsaData; int iResult; working = true; iResult = parseAnnounce(announce); if(iResult != 0){ working = false; return iResult; } //Initialize Winsock iResult = WSAStartup(MAKEWORD(2,2), &wsaData); if(iResult != 0){ return 1; } struct addrinfo *result = NULL, *ptr = NULL, hints; ZeroMemory(&hints, sizeof(hints)); hints.ai_family = AF_INET; hints.ai_socktype = SOCK_STREAM; hints.ai_protocol = IPPROTO_TCP; //Resolve the server address and port iResult = getaddrinfo(address.c_str(), port.c_str(), &hints, &result); if(iResult != 0){ WSACleanup(); return 1; } ConnectSocket = INVALID_SOCKET; //Attempt to connect to the first address returned by //the call to getaddrinfo ptr = result; do{ //Create a socket for connecting to the server ConnectSocket = socket(ptr->ai_family, ptr->ai_socktype, ptr->ai_protocol); if(ConnectSocket == INVALID_SOCKET){ ptr = ptr->ai_next; continue; } //Connect to server iResult = connect(ConnectSocket, ptr->ai_addr, (int)ptr->ai_addrlen); if(iResult != SOCKET_ERROR){ break; } else { closesocket(ConnectSocket); ConnectSocket = INVALID_SOCKET; ptr = ptr->ai_next; } } while(ptr != NULL); freeaddrinfo(result); if(ConnectSocket == INVALID_SOCKET){ working = false; WSACleanup(); return 1; } return 0; } Then the program performs code to generate the message to be sent to the trackers. For each tracker class in the vector it's trackerSend function is called with the message, here is the trackerSend function: int trackerSocket::trackerSend(string getParams){ int iResult; ostringstream os; os << "GET " << page << getParams << " HTTP/1.1\r\n" << "Host: " << address << "\r\n" << "Accept: text/html\r\n" << "\r\n"; string sendBuf = os.str(); //Send tracker request iResult = send(ConnectSocket, sendBuf.c_str(), strlen(sendBuf.c_str()), 0); if(iResult == SOCKET_ERROR){ working = false; closesocket(ConnectSocket); WSACleanup(); return 1; } return 0; } Every time the program runs the send function returns -1 for every tracker. If I call the WSAGetLastError() function it returns 10093. The msdn definition for this error is: Successful WSAStartup not yet performed. Either the application has not called WSAStartup or WSAStartup failed. The application may be accessing a socket that the current active task does not own (that is, trying to share a socket between tasks), or WSACleanup has been called too many times. I can't see that WSACleanup has been called too many times so I can only assume that the socket is not owned by the current active task (no idea what that means), can anyone see the problem? Heres some of the code for the main program (which I have described above): //Store tracker URL's in vector vector<trackerSocket> trackers; trackerSocket *temptracker = new trackerSocket(); iResult = temptracker->trackerInitialize(announce); if(iResult == 0){ trackers.push_back(*temptracker); } if(announcelist != NULL){ i = 0; while(announcelist[i]){ if(strcmp(announcelist[i]->val.l[0]->val.s, announce.c_str()) != 0){ temptracker = new trackerSocket(); iResult = temptracker->trackerInitialize(announcelist[i]->val.l[0]->val.s); if(iResult == 0){ trackers.push_back(*temptracker); } } i++; } } //Check that at least one of the tracker URL's was valid if(trackers.size() == 0){ printf("None of the tracker URL's provided were valid.\n"); return 1; } //Generate some required values string peerid = genPeerID(); string peerport = "12345"; int uploaded = 0; int downloaded = 0; //Work out how many bytes are left to download int left = 0; if(singlefile){ left = length; } else { for(i = 0; i < filesinfo.size(); i++){ left += filesinfo[i].length; } } //Send GET Request to tracker i = 0; ostringstream os; string getParams; string response; os << "info_hash=" << infohash << "&peer_id=" << peerid << "&port=" << peerport << "&uploaded=" << uploaded << "&downloaded=" << downloaded << "&event=started"; getParams = os.str(); do{ iResult = trackers[i].trackerSend(getParams); if(iResult != 0){ printf("trackerSend %d failed: %d\n", i, iResult); i++; continue; }
0
[ 2, 4041, 5668, 2660, 13614, 29, 7019, 808, 4069, 800, 3726, 3726, 31, 589, 1174, 21, 1142, 2153, 8993, 6819, 17, 376, 20, 2203, 1886, 792, 445, 84, 21, 13, 38, 7439, 2760, 9, 19, 389, 20, 107, 48, 31, 738, 21, 4041, 5668, 28051,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
WPF: Multibinding with IDataErrorInfo-based validation not working === In WPF I have constructed a numerical *Textbox* **NumericTextbox** which is two-way bound to a *Slider*. This way the user can either of the controls to adjust a specific number. As I want the textbox format have the number individually I use a multibinding together with a converter. This way the *Slider*-selected *double* number gets converted to a nice *string*: <!-- language: c# --> <local:NumericTextBox.Text> <MultiBinding Converter="{StaticResource converter}" UpdateSourceTrigger="PropertyChanged" ValidateOnDataErrors="True" NotifyOnValidationError="True"> <Binding ElementName="slider" Path="Value" Mode="TwoWay" /> <Binding Path="Format" /> </MultiBinding> </local:NumericTextBox.Text> ...where 'Format' is a *FormatString*, 'slider' is a *Slider*, 'converter' is the aforementioned *IMultiValueConverter* and *NumericTextBox* is defined as follows: <!-- language: c# --> public partial class NumericTextbox : Textbox, IDataErrorInfo { // ... Some dependency properties that are used for validation purposes ... public string this[string columnname] { get { /* return some error-indicating string */ } }
0
[ 2, 619, 7721, 45, 1889, 22260, 29, 31, 18768, 29992, 108, 4120, 8, 1281, 27999, 52, 638, 800, 3726, 3726, 19, 619, 7721, 31, 57, 2096, 21, 16010, 1637, 11969, 5309, 2483, 13, 1409, 6336, 14744, 11969, 5309, 1409, 56, 25, 81, 8, 14...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Displaying factors of a number === I want to display every factor of a number typed in a textfield to achieve this I tried using an array. But I am always getting the error `'NSRangeException', reason: '*** -[__NSArrayM objectAtIndex:]: index 1 beyond bounds [0 .. 0]'` . Any suggestions to eliminate this error? NSMutableArray *array; array = [NSMutableArray arrayWithCapacity:100]; for (factorsNumber=1; factorsNumber<=prime; factorsNumber++) { if (number%factorsNumber == 0) { [array addObject:[NSString stringWithFormat:@"%d", factorsNumber]]; } } for (int i = 0; i <= [array count]; i++) { factors.text = [NSString stringWithFormat:@"%d", i, [[array objectAtIndex:i] intValue]]; }
0
[ 2, 17418, 4776, 16, 21, 234, 800, 3726, 3726, 31, 259, 20, 3042, 352, 3932, 16, 21, 234, 1001, 43, 19, 21, 1854, 1109, 20, 4689, 48, 31, 794, 568, 40, 7718, 9, 47, 31, 589, 550, 1017, 14, 7019, 13, 1, 22, 2172, 8366, 10066, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Iterating through XML === XML: <?xml version="1.0" encoding="utf-8"?> <NConfig xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <NDomain>ex1</NDomain> <Parameters> <version>p</version> <siteFolder>site1</siteFolder> <cssGeneral></cssGeneral> <cssLogin>l.css</cssLogin> </Parameters> <Database> <hostname>898</hostname> <username>j</username> <password>k</password> <name>n</name> </Database> </NConfig> I would like to itterate through all the nodes under <NDomain>ex1</NDomain> So far, I can directly access the nodes by doing this: $xmldata = simplexml_load_file("config.xml"); foreach($xmldata->Parameters as $item) { echo "<p>Version: " . $item->version . "</p>"; echo "<p>Site Folder: " . $item->siteFolder . "</p>"; } But that doesn't make it root node specific, rather it will iterate though all of the parameters in the list. How can I do this? Cheers.
0
[ 2, 32, 106, 1880, 120, 23504, 800, 3726, 3726, 23504, 45, 13, 1, 60, 396, 8184, 615, 3726, 7, 165, 9, 387, 7, 19608, 3726, 7, 1982, 410, 8, 457, 7, 60, 1, 13, 1, 103, 14093, 2816, 23504, 2172, 45, 396, 18, 49, 3726, 7, 21127...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
PowerShell - appending strings === I want to append several strings in a DataSet with custom strings. **Example** Content of Dataset: Test1 Test2 Test3 Result after appending: Test1.com Test2.com Test3.com Would I have to use regex to parse to the end of each Test[n] to be able to append it with a custom string (.com)? Has anyone got an example that describes exactly how to do it?
0
[ 2, 414, 15984, 13, 8, 4865, 7601, 7887, 800, 3726, 3726, 31, 259, 20, 4865, 2451, 238, 7887, 19, 21, 1054, 3554, 29, 5816, 7887, 9, 13, 1409, 29041, 1409, 2331, 16, 1054, 3554, 45, 1289, 165, 1289, 135, 1289, 240, 829, 75, 4865, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
SQL with many results in PHP === I have an SQL that brings back all the users of a system in a MySQL database with PHP and I need to get these users and move them to another system (don't worry about the fields, I already map them). The problem is that I have more than 67000 users in the database. Is there any way I can do that with PHP and get all the results at once?? Cause I tried and give me a error, not an error, but the PHP can't return all the results at once.
0
[ 2, 4444, 255, 29, 151, 1736, 19, 13, 26120, 800, 3726, 3726, 31, 57, 40, 4444, 255, 30, 7620, 97, 65, 14, 3878, 16, 21, 329, 19, 21, 51, 18, 22402, 6018, 29, 13, 26120, 17, 31, 376, 20, 164, 158, 3878, 17, 780, 105, 20, 226,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to Change my TabbarGroup Color Change? === I want to make a tabbar application. In this application I Want to change my Tabbar Background Color Change. How I Can perform This?
0
[ 2, 184, 20, 753, 51, 6523, 1850, 8024, 1665, 753, 60, 800, 3726, 3726, 31, 259, 20, 233, 21, 6523, 1850, 3010, 9, 19, 48, 3010, 31, 259, 20, 753, 51, 6523, 1850, 2395, 1665, 753, 9, 184, 31, 92, 2985, 48, 60, 3, 0, 0, 0, 0...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
deny apache2 access after failed login attempts === after 4 failed username/password login attempts, I would like to deny the IP access to the server. I've denied access to the web server before by adding the IP or block to the /etc/apache2/httpd.conf file like so. <Location "/"> Order Allow,Deny Allow from all Deny from 1.2.3.4/30 3.4.5.6/15 Deny from 9.4.3.4 </Location> anyone know how to do this programmatically with PHP, or perhaps have Apache2 query mysql for an 'IP-deny list' at a set interval? thanks!
0
[ 2, 9258, 17140, 135, 1381, 75, 1702, 6738, 108, 3265, 800, 3726, 3726, 75, 268, 1702, 4155, 7259, 118, 6201, 9587, 6738, 108, 3265, 15, 31, 83, 101, 20, 9258, 14, 15735, 1381, 20, 14, 8128, 9, 31, 22, 195, 5265, 1381, 20, 14, 27...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Linq Dynamic ConnectionString Application Settings === I want to read my connection strings from the Web.config or App.Config file. I attempted to follow the advice in another Stackoverflow post. The suggestion was to: 1. Set Application Settings in the Linq to Sql DBML file to false. (Double-click on the Linq to Sql file to open it, right-click on white space in the designer surface, select Properties, expand Connection property. ) 3. Set Connection to (None) in the Linq to SQL DBML file. 4. Add an OnCreated event method in the data context partial class to read the connection string from web.config or app.config. When I make the above changes and attempt to compile my code I get: Error 2 Expression of type 'Object' is not queryable. Make sure you are not missing an assembly reference and/or namespace import for the LINQ provider. The error occurs on the 2nd line below: Using DcObj = New HMR_LinqToSql_QuestionDataContext() Dim Query = From Q In DcObj.tblQuestions Select Q ' *** Error on this line Count = Query.Count() DcObj.tblQuestions.DeleteAllOnSubmit(Query) DcObj.SubmitChanges() End Using The only way, I found, to clear the error is to set Application Settings to True and select a connection string entry in the Connection drop down list. If I revert to Application Settings = True that mean there is still connection strings in the Linq to Sql files. Any ideas for a solution? Ed
0
[ 2, 6294, 1251, 7782, 2760, 11130, 3010, 12410, 800, 3726, 3726, 31, 259, 20, 1302, 51, 2760, 7887, 37, 14, 2741, 9, 14093, 2816, 54, 4865, 9, 14093, 2816, 3893, 9, 31, 3066, 20, 1740, 14, 4978, 19, 226, 7566, 2549, 9990, 678, 9, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to reverse a java-script variable that hold html dom? === I need to print out receipts that inserted into my database, and the latest receipt should be on the top of my page. But when I query my database, I store all the data inside a var s, and naturally it will make the data that was inserted earliest on the top of my page, how do I reverse this? function querySuccess(tx, results){ if(results.rows.length == 0) { $("#ReceiptsList").html("<p>You have no receipts captured yet</p>"); } else { var s = ""; for(var i = 0; i<results.rows.length; i++) s += "<a href='edit.html?id="+results.rows.item(i).id+"'><strong><font size = 3> " + results.rows.item(i).name +"<font></strong>" + "&nbsp;&nbsp;&nbsp;&nbsp;<font size = 1>Date:" +results.rows.item(i).date + "<font></a> "; } //I tried s.reverse(); but didn't work, nothing was showed on the page $("#ReceiptsList").html(s); }
0
[ 2, 184, 20, 7006, 21, 8247, 8, 8741, 7612, 30, 1027, 13, 15895, 11859, 60, 800, 3726, 3726, 31, 376, 20, 4793, 70, 20069, 18, 30, 14215, 77, 51, 6018, 15, 17, 14, 5736, 20069, 378, 44, 27, 14, 371, 16, 51, 2478, 9, 47, 76, 3...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
iOS file i/o best practice === I am writing a iOS app that contains an array of NSDictionary objects these objects can be added/removed and edited by the user. The array is stored in a plist and loaded at runtime. I am wondering what the best practice would be on when to store the data into the plist i.e. should I do it every time the array changes or only when the app is terminated or goes in the background?
0
[ 2, 13, 7760, 3893, 31, 118, 111, 246, 1345, 800, 3726, 3726, 31, 589, 1174, 21, 13, 7760, 4865, 30, 1588, 40, 7718, 16, 13, 2172, 22595, 1857, 3916, 158, 3916, 92, 44, 905, 118, 99, 16598, 43, 17, 4802, 34, 14, 4155, 9, 14, 77...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
MS Access: Using Single form to enter query parameters in MS access === compliment of the day. Based on the previous feedback received, After creating a Ticket sales database in MS Access. I want to use a single form to Query the price of a particular ticket at a particular month and have the price displayed back in the form in a text field or label. Below are sample tables and used query **CompanyTable** CompID CompName A Ann B Bahn C Can KK Seven - -- **TicketTable** TicketCode TicketDes 10 Two people 11 Monthly 12 Weekend 14 Daily **TicketPriceTable** ID TicketCode Price ValidFrom 1 10 $35.50 8/1/2010 2 10 $38.50 8/1/2011 3 11 $20.50 8/1/2010 4 11 $25.00 11/1/2011 5 12 $50.50 12/1/2010 6 12 $60.50 1/1/2011 7 14 $15.50 2/1/2010 8 14 $19.00 3/1/2011 9 10 $40.50 4/1/2012 **Used query:** SELECT TicketPriceTable.Price FROM TicketPriceTable WHERE (((TicketPriceTable.ValidFrom)=[DATE01]) AND ((TicketPriceTable.TicketCode)=[TCODE01])); * In MS Access, a mini boxes pops up to enter the parameters when running the query. How can I use a single form to enter the parameters for [DATE01] and [TCODE01]. and the price displayed in the same form in a textfield (For further calculations). Such as 'Month' field equals to input to [DATE01] parameter 'Ticket Code' equals to input for [TCODE01] parameter Textfield equals to output of the query result (Ticket price) * If possible, I would like to use only the Month and Year in this format MM/YYYY.The day is not necessarry. How can I achieve it in MS Access? If any question, please don't hesitate to ask Thanks very much for your time and anticipated feedback. [1]: http://i.stack.imgur.com/bc4g6.png
0
[ 2, 4235, 1381, 45, 568, 345, 505, 20, 2830, 25597, 12905, 19, 4235, 1381, 800, 3726, 3726, 11606, 16, 14, 208, 9, 432, 27, 14, 1158, 13111, 420, 15, 75, 2936, 21, 6133, 2598, 6018, 19, 4235, 1381, 9, 31, 259, 20, 275, 21, 345, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
XSLTProcessor xmlSAX2Characters: out of memory === I have a page which load a 500 mb xml file and parses the file using an xsl template. The parser works perfectly in my local environment. I am using WAMP. On the web server. Warning: DOMDocument::load() [domdocument.load]: (null)xmlSAX2Characters: out of memory in /home/mydomain/public_html/xslt/largeFile.xml, line: 2031052 in /home/mydomain/public_html/xslt/parser_large.php on line 6 My Code is as below, line 6 loads the xml file `<?php` `$xslDoc = new DOMDocument();` `$xslDoc->load("template.xslt");` `$xmlDoc = new DOMDocument();` `$xmlDoc->load("largeFile.xml");` `$proc = new XSLTProcessor();` `$proc->importStylesheet($xslDoc);` `echo $proc->transformToXML($xmlDoc);` `?>` I have tried copying the php.ini file from the wamp installation to the folder where the above code is located. But this has not helped. The memory limit in this php.ini file is memory_limit = 1000M Any advice / experience on this would be greatly appreciated
0
[ 2, 993, 18, 255, 38, 16835, 248, 23504, 18, 7522, 135, 24589, 18, 45, 70, 16, 1912, 800, 3726, 3726, 31, 57, 21, 2478, 56, 6305, 21, 3033, 14023, 23504, 3893, 17, 2017, 7202, 14, 3893, 568, 40, 993, 18, 255, 22894, 9, 14, 2017, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Appropriate Link saying Memory limits of App in iOS === Yeh ! May be after reading the Title, you might go for down-vote. But I request you to go through following question please. I am developing an Application for iPad & it consumes 5.5 MB at max on RAM of the iPad. I have ensured all this stuff using `Instruments` number of times. As soon as App uses little bit more memory, It throws memory warnings & app start behaving abnormally. 1. I have implemented the lines of code for freeing the memory in did-receive memory warning. 2. I also have ensured that `NO LEAKS` in the entire app. 3. I came to know that App needs at-least 6 mb memory. Here is the general flow of the app. log in `->` 1st-list View `->` 2nd-list view `->` 3rd-list view `->` 4th-Map & listview `->` 5.Map&List brief of each screen. 1. log-in - simple screen with username-pswd, making a web-service call & authenticating user 2. based on result of authentication, it will fetch few more data & list it on 1st-list View screen. 3. based on selection from 1st-list, app will load list on 2nd-list view 3. based on selection from 2nd-list, app will load list on 3rd-list view 4. based on selection from 3rd-list, app will load list & map will have pins relatively. 5. based on annotation from Map, app will navigate to another maps & different pins. Here, app receives memory warnings on 6th screen. I have ensured all coding standards & all importance of all objects. In Above case, All screens are very necessary, I am using Navigation Controller & just pushing view-controllers one by one. no duplications - ensured twice. Now, the point is, App is being tested on iPad-1 with iOS 4.1 & all apps are forcefully closed before starting the testing of the app. THOUGH, app receives warnings @ just 5.5 mb usage. I tried to convince my project managers that, this amount of memory usage is high & they are asking me - there should some option to set MEMORY. How this kind of High Graphics games & apps are running smoothly ? I can't find appropriate document from Apple saying LIMIT. I have no answer to them. If setting Memory limit is not possible, I am requesting you to provide Appropriate PROOF link, so that I can show it to my Project Manager. If that kind of settings is possible, I am highly eager to know how to make that. Thanks in advance. Eagerly waiting for reply & refreshing this page every 30 seconds.
0
[ 2, 4593, 3508, 1148, 1912, 5887, 16, 4865, 19, 13, 7760, 800, 3726, 3726, 3617, 252, 13, 187, 123, 44, 75, 1876, 14, 581, 15, 42, 530, 162, 26, 125, 8, 28195, 9, 47, 31, 3772, 42, 20, 162, 120, 249, 1301, 2247, 9, 31, 589, 3...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to make my distance sort a double === I'm currently pulling info from an sql DB where the 'cachedDist' column is set as a double. However when I pull it into my app and create my array I turn it into an String and the sort will obviously be off, 18.15 will come before 2.15. How do I fix that in my code so it will sort distance as a Double and not a String? In Bar object. NSString *cachedDist @property(nonatomic,copy) NSString *cachedDist; --- @synthesize cachedDist; --- My while loop in the View Controller. while (sqlite3_step(sqlStatement)==SQLITE_ROW) { Bar * bar = [[Bar alloc] init]; bar.barName = [NSString stringWithUTF8String:(char *) sqlite3_column_text(sqlStatement,1)]; bar.barAddress = [NSString stringWithUTF8String:(char *) sqlite3_column_text(sqlStatement,2)]; bar.barCity = [NSString stringWithUTF8String:(char *) sqlite3_column_text(sqlStatement, 3)]; bar.barState = [NSString stringWithUTF8String:(char *) sqlite3_column_text(sqlStatement, 4)]; bar.barZip = [NSString stringWithUTF8String:(char *) sqlite3_column_text(sqlStatement, 5)]; bar.barLat = [NSString stringWithUTF8String:(char *) sqlite3_column_text(sqlStatement, 8)]; bar.barLong = [NSString stringWithUTF8String:(char *) sqlite3_column_text(sqlStatement, 9)]; if (currentLoc == nil) { NSLog(@"current location is nil %@", currentLoc); }else{ CLLocation *barLocation = [[CLLocation alloc] initWithLatitude:[bar.barLat doubleValue] longitude:[bar.barLong doubleValue]]; CLLocationDistance distancekm = [currentLoc distanceFromLocation: barLocation]/1000; NSString *distanceString = [[NSString alloc] initWithFormat: @"%0.2f", distancekm]; bar.cachedDist = distanceString; [thebars addObject:bar]; }
0
[ 2, 184, 20, 233, 51, 1583, 2058, 21, 1494, 800, 3726, 3726, 31, 22, 79, 871, 3303, 15404, 37, 40, 4444, 255, 13, 9007, 113, 14, 13, 22, 793, 6261, 43, 702, 22, 4698, 25, 309, 28, 21, 1494, 9, 207, 76, 31, 2201, 32, 77, 51, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to combine all the resources of a program? === Is there a way to make c# programs a single, executable, file that people can just download and play, instead of installing?
0
[ 2, 184, 20, 12287, 65, 14, 2566, 16, 21, 625, 60, 800, 3726, 3726, 25, 80, 21, 161, 20, 233, 272, 5910, 1726, 21, 345, 15, 1396, 17194, 5924, 15, 3893, 30, 148, 92, 114, 7121, 17, 418, 15, 700, 16, 25429, 60, 3, 0, 0, 0, 0...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
Conditionally execute a command at file load in emacs 24 === I'm looking to automate my development and I would like emacs to execute a few commands automatically when I load any file called "project.clj" Specifically I'd like it to check the open buffers, and if there isn't a buffer called "swank" execute the clojure-jack-in command as if it came from the "project.clj" buffer, and then I'd like it to run shell and speedbar as well, but I imagine once I figure out how to do the above, those will be easy. I am a complete elisp noob, but I'm familiar with lisp in general.
0
[ 2, 2874, 1326, 15644, 21, 1202, 35, 3893, 6305, 19, 13, 62, 6893, 18, 937, 800, 3726, 3726, 31, 22, 79, 699, 20, 3108, 5281, 51, 522, 17, 31, 83, 101, 13, 62, 6893, 18, 20, 15644, 21, 310, 14294, 7499, 76, 31, 6305, 186, 3893,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
addition of one column with certain condition in another colum, like sumifs of excel === i have a matrix like this A=[ 1 2; 2 3; 3 4; 4 5; 5 6; 6 8; 7 9; 8 5; 9 4] now I want to add second column, condition is that if limit=0, and interval=3 and limit=limit+interval,, or in other words, i have to sum column 2 when values of column 1, ranges like 0 to 3, 3 to 6, 6 to 9, and 9 to 12, and i want sum of corresponding values of column 2. my solun will be like that range-- sum 0 to 3 9 3 to 6 19 6 to 9 18 like that i have a matrix of arround 7000X2. in place of range just serial no may also be given. this is just an example. plz help... i want answer in matlab code
0
[ 2, 848, 16, 53, 4698, 29, 1200, 2874, 19, 226, 326, 4404, 15, 101, 3907, 821, 18, 16, 20700, 800, 3726, 3726, 31, 57, 21, 8187, 101, 48, 21, 3726, 2558, 137, 172, 73, 172, 203, 73, 203, 268, 73, 268, 331, 73, 331, 400, 73, 4...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Iterate through zero in JS === How can I construct a for loop so that I iterate form zero to 15 in increments of 4, starting with zero? In other words, output should be 0,3,7,11,15 Many thanks in advance Joe
3
[ 2, 32, 106, 1373, 120, 4606, 19, 487, 18, 800, 3726, 3726, 184, 92, 31, 6960, 21, 26, 5293, 86, 30, 31, 32, 106, 1373, 505, 4606, 20, 357, 19, 13, 28461, 18, 16, 268, 15, 1422, 29, 4606, 60, 19, 89, 715, 15, 5196, 378, 44, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0...
Update a ManyToMany Relationship Through the Inverse Side in Doctrine2 === My recipe entity: /** * @ORM\ManyToMany(targetEntity="Category", inversedBy="recipes") */ private $categories; My Category entity: /** * @ORM\ManyToMany(targetEntity="Recipe", inversedBy="categories") * @ORM\JoinTable(name="recipe_category") */ private $recipes; Ok this is from http://www.youtube.com/watch?v=kPrgoe3Jrjw&feature=related. With this two owning sides all works fine. But the cli gives the error: 'The table with name recipe_category already exists. Does anyone have any idea's how the best practice?
0
[ 2, 11100, 21, 151, 262, 14842, 1429, 120, 14, 19, 9453, 270, 19, 7521, 135, 800, 3726, 3726, 51, 20510, 9252, 45, 13, 118, 1409, 1637, 13, 1, 248, 79, 1, 14842, 262, 14842, 5, 3958, 3060, 2291, 856, 3726, 7, 14375, 93, 7, 15, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Apache SetEnvIf and using %{ENV:...} === My question is related to the use of `SetEnvIf` and how I can then use the environment variables correctly as I need them. I shall explain what I need to do, then what I already have... I need to set the php application directory in my htaccess file, as some of the rewrite rules use that directory name, and I'm trying to allow the admin user the ability to change it. It is currently set in the php, and changing it is done manually in the htaccess file and then again in the php. To achieve this, I currently have the following (taking advice regarding using env vars in rewrite rules) SetEnvIf SERVER_PROTOCOL ".*" APP_DIR=application It's set up that way to get the env var set before any rewrite rules, as `SetEnv` is processed after any rewrite rules, whereas `SetEnvIf` is processed before. Now I can access `APP_DIR` using `%{ENV:APP_DIR}` in rewrite conditions, and the second part of any rewrite rules. What I need to achieve is a little more complex than that, as the application directory doesn't exist, but is rather a redirect to let the PHP application know to process as a back-end rather than a front-end, for example the rewrites currently (without the env var) are ### ADMIN REWRITE RewriteRule ^application\/?$ index.php?mode=administration&%{QUERY_STRING} [NC,L] RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^application(\/(.*\/?))?$ index.php?page=$1&mode=administration&%{QUERY_STRING} [NC,L] ### FRONTEND REWRITE - Will ignore files and folders RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*\/?)$ index.php?page=$1&%{QUERY_STRING} [L] So, as you can probably see, I need to be able to substitute `application` for `APP_DIR` to let the administrators of the system change the path, so it could be `cms` or `admin` etc. Sadly, the following won't work ### ADMIN REWRITE RewriteRule ^%{ENV:APP_DIR}\/?$ index.php?mode=administration&%{QUERY_STRING} [NC,L] RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^%{ENV:APP_DIR}(\/(.*\/?))?$ index.php?page=$1&mode=administration&%{QUERY_STRING} [NC,L] ### FRONTEND REWRITE - Will ignore files and folders RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*\/?)$ index.php?page=$1&%{QUERY_STRING} [L] `%{ENV:APP_DIR}` cannot be used in the regex of a rewrite, as the regex is processed before any rewrites, and the env vars. Has anyone ever achieved what I need? Can it be done, even if it means adjusting the rewrite logic somewhat? I must state that the php logic after the rewrites can't be changed as it's a long time existing system which would have backwards compatibility issues if it were.
0
[ 2, 17140, 309, 219, 710, 821, 17, 568, 13, 11881, 1, 219, 710, 45, 9, 9, 9, 1, 800, 3726, 3726, 51, 1301, 25, 1597, 20, 14, 275, 16, 13, 1, 3554, 219, 710, 821, 1, 17, 184, 31, 92, 94, 275, 14, 2307, 12157, 12044, 28, 31, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
netbeans does not update and commit due to svn E170001: Unable to connect to a repository at URL === I am really trying to make netbeans to work ok with svn. svn version: TortoiseSVN 1.7.7, Build 22907 - 64 Bit netbeans version: NetBeans IDE 7.1.2 (Build 201204101705) Java: 1.7.0_03; Java HotSpot(TM) 64-Bit Server VM 22.1-b02 System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb) when I try to update or commit files from the netbeans: E170001: Unable to connect to a repository at URL 'url-name' E170001: OPTIONS of 'url-name': authorization failed: Could not authenticate to server: rejected Basic challenge outside the netbeans, svn is working ok, I was able to upload the environment using the svn, and all ok. in the netbeans - all files looks updated, when I edit a file it is marked as new. I am sure the repository url, user and password are ok. not using proxy different configuration. I tried the following: 1. update the svn bin directory in the netbeans 2. copy svn auth files to netbeans auth directory (it helped the situation that only the new files are recognized as new and not all) 3. cleared saved data in the tortoise configuration 4. re save the user and password in the netbeans config menu nothing helped I really need to set this up.. maybe someone has an idea how. thanks
0
[ 2, 4275, 863, 5950, 630, 52, 11100, 17, 9686, 397, 20, 13, 18, 16578, 13, 62, 16266, 18951, 45, 2343, 20, 6379, 20, 21, 24869, 35, 287, 6362, 800, 3726, 3726, 31, 589, 510, 749, 20, 233, 4275, 863, 5950, 20, 170, 5854, 29, 13, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Page turn effect using javascript and jquery === I am looking forward to develope a Javascript or jQuery code to create a page turn effect for the pages of a book. The pages of the books are in HTML format. I want to know the steps to create such an effect. I am finding it hard to visualize what changes take place in an HTML page while an effect like this takes place. can anyone explain me what happens exactly in such a script??
1
[ 2, 2478, 805, 1590, 568, 8247, 8741, 17, 487, 8190, 93, 800, 3726, 3726, 31, 589, 699, 917, 20, 2803, 62, 21, 8247, 8741, 54, 487, 8190, 93, 1797, 20, 1600, 21, 2478, 805, 1590, 26, 14, 4434, 16, 21, 360, 9, 14, 4434, 16, 14, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
black background when overriding drawRect in UIScrollView === So I am trying to override drawRect in my UIScrolLView, however it gives me this black background instead of the background color that I've specified for my UIScrollView. Why is this? If I remove the drawRect code then everything is fine: - (void)drawRect:(CGRect)rect { [super drawRect:rect]; if (shouldDrawVerticalLineForProfile){ CGContextRef context = UIGraphicsGetCurrentContext(); CGColorRef separatorColor = [UIColor colorWithRed:47.0/255.0 green:47.0/255.0 blue:47.0/255.0 alpha:1.0].CGColor; // Add at bottom CGPoint startPoint = CGPointMake(60, 0); CGPoint endPoint = CGPointMake(60, 10000); CGContextSaveGState(context); CGContextSetLineCap(context, kCGLineCapSquare); CGContextSetStrokeColorWithColor(context, separatorColor); CGContextSetLineWidth(context, 5.0); CGContextMoveToPoint(context, startPoint.x + 0.5, startPoint.y + 0.5); CGContextAddLineToPoint(context, endPoint.x + 0.5, endPoint.y + 0.5); CGContextStrokePath(context); CGContextRestoreGState(context); } }
0
[ 2, 319, 2395, 76, 84, 5175, 68, 2003, 14673, 38, 19, 13, 5661, 3862, 8694, 4725, 800, 3726, 3726, 86, 31, 589, 749, 20, 84, 11891, 2003, 14673, 38, 19, 51, 13, 5661, 3862, 8694, 4725, 15, 207, 32, 2352, 55, 48, 319, 2395, 700, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Datagridview excessive memory usage === I have an unbound datagridview with 175 columns and 50,000 rows, populated primarily with doubles. According to my calculations, this equates to a memory usage of 175*50000*8 bytes = 70 MB. However, Task Manager says the grid is using about 1.2 GB of memory - an 17x overhead! Can anyone explain why it's consuming so much memory? From the msdn article on scaling the datagridview ( http://msdn.microsoft.com/en-us/library/ha5xt0d9.aspx ) I don't think I'm doing anything flagrantly wrong. I'm not setting styles or contextmenustrips for individual cells. No modifications other than populating the cell values and setting format strings on column level. I understand that virtual mode or shared rows might decrease memory consumption, but given my above calculations, I don't think it should be necessary. 17x overhead doesn't sound right to me.
0
[ 2, 1054, 16375, 4725, 11513, 1912, 7514, 800, 3726, 3726, 31, 57, 40, 367, 7410, 1054, 16375, 4725, 29, 10751, 7498, 17, 14522, 11295, 15, 11111, 2257, 29, 7784, 9, 496, 20, 51, 19186, 15, 48, 27404, 18, 20, 21, 1912, 7514, 16, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Joomla module to list and search data from DB === I'm not sure if this is the place to ask this. Up to now I've used Stackoverflow just for Android related questions. I hope I'm not breaking any rules. Is there any module I can use on Joomla 2.5 where I can search and list data from the database? In my case it would be book titles, author, etc.. Thannk you.
0
[ 2, 2640, 2636, 531, 12613, 20, 968, 17, 2122, 1054, 37, 13, 9007, 800, 3726, 3726, 31, 22, 79, 52, 562, 100, 48, 25, 14, 209, 20, 1349, 48, 9, 71, 20, 130, 31, 22, 195, 147, 7566, 2549, 9990, 114, 26, 13005, 1597, 2346, 9, 3...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Accessing MVC Telerik combobox items using Watin === We recently migrated from stock HTML dropdown controls to Telerik MVC comboboxes. Since this migration, all our tests using Watin to validate page content and behavior have been broken due to how these Telerik comboboxes are rendered to the browser. They are not rendered like typical HTML Select/Option tags, but instead use a combination of Divs, Spans, and some input text controls. Here is what the HTML looks like that gets rendered: <div class="t-widget t-combobox t-header" style="width:263px"> <div class="t-dropdown-wrap t-state-default"> <input class="t-input" id="ComboboxId-input" name="ComboboxId-input" type="text" value="Apples" /> <span class="t-select t-header"> <span class="t-icon t-arrow-down">select</span> </span> </div> <input id="ComboboxId" name="ComboboxId" style="display:none" type="text" value="Apples" /> </div> The item selected right now in this dropdown is "Apples". There are other items, such as Oranges, Pears, Grapes, etc., but are not visible in the HTML source. Telerik attaches this information to the DOM and through its own client-side scripts fakes a dropdown. Given this, I can't find a way to select a specific dropdown item in this Telerik combobox through Watin. Does anyone have any experience or success doing this (or any suggestions)? If so, what was your solution? NOTE: I posted something to the Telerik forums as well, but would be surprised if they know since I'm trying to use a 3rd party tool to work with another 3rd party tool. Also, we are using Telerik MVC control kit version 2012.1.419 and Watin 2.1.
0
[ 2, 1381, 68, 307, 8990, 4338, 6639, 22621, 5309, 3755, 568, 15553, 108, 800, 3726, 3726, 95, 1989, 14204, 37, 2070, 13, 15895, 2804, 2968, 8671, 20, 4338, 6639, 307, 8990, 22621, 5309, 160, 9, 179, 48, 8443, 15, 65, 318, 4894, 568, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Programmatically obtain Storage Space Allocation - Lists === I am tasked with writing a report that pulls data out of a the "Storage Space Allocation" section within various SharePoint sites. I am able to screen scrape the general "Document Libraries" values by performing a general GET call, but I cannot programmatically obtain the "Lists" values. When I navigate to the SharePoint site (*/_layouts/storman.aspx) "Document Libraries" is the default selection. I think I need to send a POST call in order to change it to "Lists" [then I can scrape the values]. Creating the appropriate POST call is becomine a hassle because SharePoint does not seem to recognize my key/value pair (or maybe I'm not supplying all of the necessary parameters?). I tried this code, but no luck - only the "Document Libraries" data is returned. using (System.Net.WebClient client = new System.Net.WebClient() { UseDefaultCredentials = true }) { NameValueCollection myQueryStringCollection = new NameValueCollection(); myQueryStringCollection.Add(queryParameterName, queryParameterValue); client.QueryString = myQueryStringCollection; return client.DownloadString(url); } I also tried this (alongside other ideas): private static string GetWebResponse(string url, NameValueCollection parameters) { var httpWebRequest = (HttpWebRequest)WebRequest.Create(url); httpWebRequest.UseDefaultCredentials = true; httpWebRequest.ContentType = "application/x-www-form-urlencoded"; httpWebRequest.Method = "POST"; var sb = new StringBuilder(); foreach (var key in parameters.AllKeys) sb.Append(key + "=" + parameters[key] + "&"); sb.Length = sb.Length - 1; byte[] requestBytes = Encoding.UTF8.GetBytes(sb.ToString()); httpWebRequest.ContentLength = requestBytes.Length; using (var requestStream = httpWebRequest.GetRequestStream()) { requestStream.Write(requestBytes, 0, requestBytes.Length); requestStream.Close(); } Task<WebResponse> responseTask = Task.Factory.FromAsync<WebResponse>(httpWebRequest.BeginGetResponse, httpWebRequest.EndGetResponse, null); using (var responseStream = responseTask.Result.GetResponseStream()) { var reader = new StreamReader(responseStream); return reader.ReadToEnd(); } } Viewing the source code of the _layouts/storman.aspx page, I can see the name/value pair i need to send is **ct100$PlaceHolderMain$m_filterDropdown** and **Lists** respectively. I determined this by this view source code: <select name="ctl00$PlaceHolderMain$m_filterDropdown" id="ctl00_PlaceHolderMain_m_filterDropdown" class="ms-viewselect"> <option selected="selected" value="Document Libraries">Document Libraries</option> <option value="Documents">Documents</option> <option value="Lists">Lists</option> <option value="Recycle Bin">Recycle Bin</option> </select> Any ideas on how to get the List values from this page?
0
[ 2, 625, 6732, 1326, 5545, 4326, 726, 16840, 13, 8, 7227, 800, 3726, 3726, 31, 589, 14605, 29, 1174, 21, 1330, 30, 8071, 1054, 70, 16, 21, 14, 13, 7, 18, 2153, 1303, 726, 16840, 7, 1050, 363, 617, 1891, 3132, 3259, 9, 31, 589, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
MySQL- Query with repetitive fixed id range === I have the following query: SELECT child.id_catalog_category AS id_category, ancestor.id_catalog_category AS tree FROM catalog_category AS child JOIN catalog_category AS ancestor ON (child.lft BETWEEN ancestor.lft AND ancestor.rgt) WHERE ancestor.id_catalog_category != 1 ORDER BY id_category ASC, tree ASC which is a reconstruction of a binary tree for a hierarchical product categories. For one id_category we could have a maximum of 4 "tree" values, as the example shows: > id_category / tree > > 3 2 > > 3 3 > > 4 2 > > 4 3 > > 4 4 > > 5 2 > > 5 3 > > 5 5 > > 6 2 > > 6 3 > > 6 6 > > 7 2 > > 7 3 > > 7 7 Where the desired results should be : > id / id_category / tree > > 1 3 2 > > 2 3 3 > > 3 null null > > 4 null null > > 1 4 2 > > 2 4 3 > > 3 4 4 > > 4 null null > ..... In words, I want to add a range id from 1 to 4 for each id_category, where if id_category has less than 4 value it should show null values. Regards
0
[ 2, 51, 18, 22402, 8, 25597, 29, 24935, 3535, 4924, 978, 800, 3726, 3726, 31, 57, 14, 249, 25597, 45, 5407, 850, 9, 1340, 1, 9709, 5567, 1, 14375, 93, 28, 4924, 1, 14375, 93, 15, 14628, 9, 1340, 1, 9709, 5567, 1, 14375, 93, 28,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Hide multiple forms on one page and open them with specific links === I am creating a page and and it has multiple forms on each page. The forms are hidden but there is a link to each form. When the user clicks the link with the associated form than that form pops open in a lightbox, using colorbox.js. I have it working when only one form is on the page but I don't know how to create a script that works for multiple forms on one page. My script is: <script> jQuery(document).ready(function() { $(".myForm").hide(); $(".link_to_form").click(function() { $(".myForm").show(); }); $(".link_to_form").colorbox({ width: "50%", inline: true, opacity: ".5", href: ".myForm", onClosed: function() { $(".myForm").hide(); } }); }); </script> The link that the user clicks on has a class of "link_to_form" and the actual form is in a div with the class of "myForm". Each form also has a specific id associated with it. So when a user clicks on the "register" form the form associated with that needs to pop up. Right now, if the user clicks on a link to any form all of the forms open in a lightbox.
0
[ 2, 3077, 1886, 1997, 27, 53, 2478, 17, 368, 105, 29, 1903, 6271, 800, 3726, 3726, 31, 589, 2936, 21, 2478, 17, 17, 32, 63, 1886, 1997, 27, 206, 2478, 9, 14, 1997, 50, 3689, 47, 80, 25, 21, 3508, 20, 206, 505, 9, 76, 14, 4155...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Rail 3 update multiple using checkbox === I am following railscast #52 creating a form that updates multiple booleans. I swear I had this working, but...alas... Wondering if anyone might be able to steer me in the right direction. **Routes** resources :certificatendorsements, :collection => {:require => :put} **CertificatendorsementsController** def require Certificatendorsement.update_all(["required = ? ", true], :id => params[:certificatendorsement_ids]) redirect_to certificatendorsements_path end **index** <%= form_tag require_certificatendorsements_path, :method => :put do %> The error I get: undefined local variable or method `require_certificatendorsements_path' for #<#<Class:0x007fe096377d90>:0x007fe09637b530>
0
[ 2, 2240, 203, 11100, 1886, 568, 2631, 5309, 800, 3726, 3726, 31, 589, 249, 2240, 18, 6146, 17740, 135, 2936, 21, 505, 30, 16779, 1886, 9827, 413, 5950, 9, 31, 6688, 31, 41, 48, 638, 15, 47, 9, 9, 9, 4242, 18, 9, 9, 9, 5712, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
What good reasons are there for having the same namespace split across different assemblies? === I tend to like collecting types within a namespace, within the same compiled assembly - it makes things easy to find and references easy to manage. However, I have seen examples where the same namespace is split across projects and assemblies (in other words, in order to gain access to the complete namespace, you must reference multiple dlls). Can anyone give me some good reasons why you might want to arrange code this way? thanks
4
[ 2, 98, 254, 2932, 50, 80, 26, 452, 14, 205, 204, 5582, 2132, 464, 421, 21066, 60, 800, 3726, 3726, 31, 5480, 20, 101, 10079, 2551, 363, 21, 204, 5582, 15, 363, 14, 205, 9316, 1475, 13, 8, 32, 1364, 564, 2010, 20, 477, 17, 7231...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Java slice a String === I have a url which always ending on an number for example: String url=localhost:8080/myproject/reader/add/1/; String anotherurl= localhost:8080/myproject/actor/take/154/; And i want to take the number exist before the last slash("/") and after the second last slash.Does anyone knows how can i do this?
0
[ 2, 8247, 12982, 21, 3724, 800, 3726, 3726, 31, 57, 21, 287, 6362, 56, 550, 3119, 27, 40, 234, 26, 823, 45, 3724, 287, 6362, 3726, 15580, 11694, 45, 2887, 2887, 118, 915, 21011, 118, 10647, 106, 118, 14854, 118, 8197, 73, 3724, 226...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Map not displaying from Javascript using fusion table === I have this javascript which I am working on but the map in the HTML is just not displaying. I have a similar fusion table with layer_1 which is displaying fine but when I put layer-2 instead of layer_1 and pull up a different tableid with same code. The map does not show up. var tableid_2 = 431xxxx; var layer_2; var queryUrlHead = 'http://www.google.com/fusiontables/api/query?sql='; var queryUrlTail = '&jsonCallback=?'; var zoom = 7; var latlng = new google.maps.LatLng(3x.7996, -11x.1668); function initialize() { var myOptions = { zoom : zoom, center : latlng, mapTypeId : google.maps.MapTypeId.TERRAIN, mapTypeControl: true, mapTypeControlOptions: { style: google.maps.MapTypeControlStyle.HORIZONTAL_BAR, position: google.maps.ControlPosition.TOP_LEFT }, scaleControl: true, scaleControlOptions: { position: google.maps.ControlPosition.BOTTOM_LEFT }, }; var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); layer_2 = new google.maps.FusionTablesLayer(tableid_2); var qry = "SELECT 'Location2', 'Name2','URL' FROM " + tableid_2; layer_2.setMap(map); layer_2.enableMapTips({ select: "'Name2'", from: tableid_2, geometryColumn: 'Location2', suppressMapTips: false, delay: 50, tolerance: 5 }); addListeners(); layer_2.setQuery(qry); var col_list = 'Name2'; if(order_list && order_list !== 'Name2') { query += " ORDER BY " + order_list; } var queryurl = encodeURI(queryUrlHead + qry + queryUrlTail); $.ajax({ type : "GET", url : queryurl, dataType : "jsonp", success : dataHandlerCallback, error : function() { alert("AJAX ERROR for " + queryurl); } });
0
[ 2, 2942, 52, 17418, 37, 8247, 8741, 568, 11117, 859, 800, 3726, 3726, 31, 57, 48, 8247, 8741, 56, 31, 589, 638, 27, 47, 14, 2942, 19, 14, 13, 15895, 25, 114, 52, 17418, 9, 31, 57, 21, 835, 11117, 859, 29, 5385, 1, 165, 56, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Git: Undo local changes since failed merge === I've gotten myself into a situation that seems fairly unusual, and essentially want to split my working state into two commits. One is a merge commit and the other is a substantial commit of its own. **Here's what went down:** 1. I saved my working state with `git stash` 2. `git rebase master` 3. See some merge conflicts, fix them 4. `git stash pop` 5. Work for a while on the files with conflicts Notice that I forgot to commit the fix for the merge conflicts, so those files are still marked as conflicted. But they also have local changes that I don't want. The goal ======== One commit to resolve the merge conflicts, and one commit with my local changes.
0
[ 2, 13, 10404, 45, 367, 537, 375, 1693, 179, 1702, 12666, 800, 3726, 3726, 31, 22, 195, 4094, 992, 77, 21, 1858, 30, 2206, 6647, 4706, 15, 17, 7398, 259, 20, 2132, 51, 638, 146, 77, 81, 9686, 18, 9, 53, 25, 21, 12666, 9686, 17,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Strange character showing up in older firefox === For some reason this () character shows up in Firefox 10 randomly throughout my site, but does not appear in other browsers. I'm not sure if Stack Overflow will render it, so I'm attaching a screenshot of one area this occurs. It Looks like ASCII encoding...Any ideas? ![enter image description here][1] [1]: http://i.stack.imgur.com/jxrw9.png
0
[ 2, 2578, 925, 3187, 71, 19, 1234, 535, 18219, 800, 3726, 3726, 26, 109, 1215, 48, 13, 5, 6, 925, 1285, 71, 19, 535, 18219, 332, 21324, 892, 51, 689, 15, 47, 630, 52, 1893, 19, 89, 16495, 18, 9, 31, 22, 79, 52, 562, 100, 7566...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Rendering Waypoints === I'm writing a code that I can click in the map, parse the info to google maps route for me and save the LatLng in my Data Base. That part, it's ok, it's working. The second part of my page will be render the LatLng that its in my Data Base. Here comes the problem: How do I create an object like google retrieves me when I ask for a route(DirectionsResult Object or DirectionsRoute)? If what I'm trying to do it's wrong, please somebody tell me how to do it right. Thanks.
0
[ 2, 15307, 161, 3132, 18, 800, 3726, 3726, 31, 22, 79, 1174, 21, 1797, 30, 31, 92, 10840, 19, 14, 2942, 15, 2017, 870, 14, 15404, 20, 8144, 6867, 858, 26, 55, 17, 2079, 14, 333, 7786, 2723, 19, 51, 1054, 1000, 9, 30, 141, 15, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
ELM327 simple connect java program === I would like to make OBD2 (ELM327 bluetooth) java program to communicate with ecu. I understend that ELM327 bluetooth is request/response. But what i must set to connect to ELM327 device? When i connect, can i simply send AT Command to get OBD message responce? Can somebodey put here simple program to connect to ELM327 device?
0
[ 2, 11799, 24090, 1935, 6379, 8247, 625, 800, 3726, 3726, 31, 83, 101, 20, 233, 5122, 43, 135, 13, 5, 532, 79, 24090, 705, 15808, 6, 8247, 625, 20, 8709, 29, 13, 17194, 9, 31, 131, 11248, 43, 30, 11799, 24090, 705, 15808, 25, 377...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
C# Countdown Accumulation Timer === I have an application where I will be displaying a timer. A user will perform an event and should complete it in a certain amount of time. I currently have a timer that shows their time ticking down, but what I want now is a total accumulated time. So every time a new event starts, the time to complete the event is added to their accumulated time. Then as they are performing the event, the time is ticking off the accumulated time. This is what I have for the "current timer" u.StartingTime = u.ChangeOverStandard; u.CurrentChangeOverTime = u.StartingTime - (DateTime.Now - u.ChangeOverStart); All of these fields are timespans. This works perfect for their "current" timer But I need a "total" timer that will either show a positive timespan value..if they are getting done before they are supposed to...or a negative timespan value if they are taking too long.
0
[ 2, 272, 5910, 22566, 21488, 85, 139, 800, 3726, 3726, 31, 57, 40, 3010, 113, 31, 129, 44, 17418, 21, 85, 139, 9, 21, 4155, 129, 2985, 40, 807, 17, 378, 1279, 32, 19, 21, 1200, 2006, 16, 85, 9, 31, 871, 57, 21, 85, 139, 30, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
ASP .NET MVC Chart Helper Add Marker === I have a column chart (Total Points per Region). I want to display the actual points on the top of the column. I believe this is called the marker? Here is my code: var myChart = new Chart(width: 800, height: 500, theme: myTheme) .AddTitle("Region Report") .SetXAxis("Region") .SetYAxis("Total Points") .AddSeries("RegionReport", chartType: "Column", xValue: Model, xField: "Region", yValues: Model, yFields: "TotalPoints") .Write();
0
[ 2, 28, 306, 13, 9, 2328, 307, 8990, 1795, 448, 106, 3547, 13289, 800, 3726, 3726, 31, 57, 21, 4698, 1795, 13, 5, 20148, 819, 416, 632, 6, 9, 31, 259, 20, 3042, 14, 3463, 819, 27, 14, 371, 16, 14, 4698, 9, 31, 985, 48, 25, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
NSNetServiceBrowser not discovering my published service === I have just started learning to design iphone apps and I am trying to set up a client server environment. As a starter I would like to first make sure that the service I publish is visible to the client. I have written server and client codes wit help from Apple's Docs. However I find that though my service is getting published (netServiceWillPublish(NSNetService *)sender is called), my client is not identifying this service. At the client's side the delegate function netServiceBrowserWillSearch:(NSNetServiceBrowser *)browser is called making me believe that the client is searching for the service. However the didFindService delegate function is never called. i am stumped as to why this is not working. I have followed the sample codes for the client side from various places and my code matches theirs. Some help on this would be greatly appreciated Also I have the following questions 1. Can the service name (that comes along with the transport level protocol) be any string? Or does it have to be specified in http://www.dns-sd.org/ServiceTypes.html. Also what purpose does this solve apart from service discovery. 2. When I print out the details of the NSNetService object at the server's side (After setting up the socket and starting the service) the hostname is printed as (null) and there are no addresses being displayed. technically when a service is opened shouldn't these be set to values? If yes could someone please tell me where I am going wrong in my code? I have attached the client and server code blocks of my project where the publishing and browsing of servicing is done. Help is extremely appreciated as I am stuck in my work with this issue. This is the code snippet at the client side that browses for the services NSNetServiceBrowser *serviceBrowser; serviceBrowser = [[NSNetServiceBrowser alloc] init]; [serviceBrowser setDelegate:self]; [serviceBrowser searchForServicesOfType:@"_http._tcp." inDomain:@"local."]; This is the code snippet at the server side that publishes the service BOOL success; int fd; int err; int junk; struct sockaddr_in addr; NSInteger port; port = 0; fd = socket(AF_INET, SOCK_STREAM, 0); success = (fd != -1); if(success) { memset(&addr, 0, sizeof(addr)); addr.sin_len = sizeof(addr); addr.sin_family = AF_INET; addr.sin_port = 0; addr.sin_addr.s_addr = INADDR_ANY; err = bind(fd, (const struct sockaddr*) &addr, sizeof(addr)); success = (err == 0); } if (success) { err = listen(fd, 5); success = (err == 0); } if (success) { socklen_t addrLen; addrLen = sizeof(addr); err = getsockname(fd, (struct sockaddr *) &addr, &addrLen); success = (err == 0); if (success) { assert( addrLen = sizeof(addr)); port = ntohs(addr.sin_port); } } if (success) { CFSocketContext context = { 0, (__bridge void *) self, NULL, NULL, NULL }; assert(self->_listeningSocket == NULL); self->_listeningSocket = CFSocketCreateWithNative(NULL, fd, kCFSocketAcceptCallBack, AcceptCallBack, &context); success = (self->_listeningSocket != NULL); if (success) { CFRunLoopSourceRef rls; fd = -1; //listeningSocket is now responsible for closing the socket rls = CFSocketCreateRunLoopSource(NULL, self.listeningSocket, 0); assert(rls != NULL); CFRunLoopAddSource(CFRunLoopGetCurrent(), rls, kCFRunLoopDefaultMode); CFRelease(rls); } } if (success) { self.netService = [[NSNetService alloc] initWithDomain:@"local." type:@"_http._tcp." name:@"test" port:port]; success = (self.netService != nil); } if (success) { self.netService.delegate = self; [self.netService publishWithOptions:NSNetServiceNoAutoRename]; } if (success) { assert(port != 0); [self serverDidStartOnPort:port]; } else { [self stopServer:@"Start Failed"]; if (fd != -1) { junk = close(fd); assert(junk == 0); } } This is the code snippet that tells that the service is published and prints out the details of my NSSocket object - (void)netServiceWillPublish:(NSNetService *)sender { NSLog(@"This function is getting called"); NSLog(@"sender.name %@",sender.name); NSLog(@"sender.addresses %@",sender.addresses); NSLog(@"sender.domain %@",sender.domain); NSLog(@"sender.hostname %@",sender.hostName); NSLog(@"sender.type %@",sender.type); NSLog(@"sender.port %d",sender.port); } Thanks Vivek
0
[ 2, 13, 2172, 2328, 11449, 25699, 4104, 52, 15799, 51, 467, 365, 800, 3726, 3726, 31, 57, 114, 373, 2477, 20, 704, 21024, 4865, 18, 17, 31, 589, 749, 20, 309, 71, 21, 6819, 8128, 2307, 9, 28, 21, 11744, 31, 83, 101, 20, 64, 233...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to optimize ruby on rails statistics per month query === I developed an application that gives logged in users an overview of statistics per month. This is my current approach: Statistics.html.haml: #(@parsed months is an array of monthnames.) - @parsed_months.each do |month| = render :partial => "statistic", :locals => {:month => month} _statistic.html.haml: %tr{:class => cycle("odd", "even")} %td= l(month, :format => "%B").capitalize %td= current_user.total_views_count(month) %td= current_user.total_leads_count(month) %td= current_user.total_clicks_count(month) The method that returns the total views: def total_views_count(month = nil) if month == nil v = 0 self.companies.each {|c| v += c.counts.size} return v else v = 0 self.companies.each {|c| v += c.counts.where(:created_at => Date.today.beginning_of_year..Date.today.end_of_year).where(:created_at => month.beginning_of_month..month.end_of_month).size} return v end end This was performing well, but after a few months the Count model has grown to a million + records, causing request timeouts on heroku. What can I do to optimize this queries or are there better approaches to do this ? Thanks in advance!
0
[ 2, 184, 20, 22864, 10811, 27, 2240, 18, 5818, 416, 1617, 25597, 800, 3726, 3726, 31, 885, 40, 3010, 30, 2352, 13, 19287, 19, 3878, 40, 21598, 16, 5818, 416, 1617, 9, 48, 25, 51, 866, 2141, 45, 5818, 9, 15895, 9, 1225, 255, 45, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Java MultiThread wait until child threads die === I have following Java code: import java.io.*; class Global{ public static int a = 0 ; public static int b = 0 ; } public class Example{ public static void main(String args[]) { try { FileOutputStream fos = new FileOutputStream("1.dat"); DataOutputStream dos = new DataOutputStream(fos); for (int i = 0; i < 20000; i++) { dos.writeInt(i); } dos.close(); FileOutputStream fos1 = new FileOutputStream("2.dat"); DataOutputStream dos1 = new DataOutputStream(fos1); for (int i = 20000; i < 40000; i++) { dos1.writeInt(i); } dos1.close(); Exampless.createArray(20000); //static method call to set the static arr variable Exampless ex1 = new Exampless("1.dat"); //found number of matches in file Exampless ex2 = new Exampless("2.dat"); Thread t1 = new Thread(ex1); Thread t2 = new Thread(ex2); t1.start(); t1.join(); t2.start(); t2.join(); System.out.println("No. of Matches: " + (Global.a + Global.b )); } catch (Exception e) { System.err.println("Error: " + e.getMessage()); } } } class Exampless implements Runnable { public static int[] arr = new int[20000]; public String _name; public Exampless(String name) { this._name = name; } static void createArray(int z) { for (int i = z; i < z + 20000; i++) { arr[i - z] = i; } } public void run() { try { int cnt = 0; FileInputStream fin = new FileInputStream(_name); DataInputStream din = new DataInputStream(fin); for (int i = 0; i < 20000; i++) { int c = din.readInt(); if (c == arr[i]) { cnt++; } } System.out.println("File name: " + _name + " No. of Matches: " + cnt); if(_name == "1.dat") Global.a = cnt ; else if(_name == "2.dat") Global.b = cnt ; } catch (Exception e) { System.err.println("Error: " + e.getMessage()); } } } There I am trying to run Exampless classes `run` method parallely. However, I want to make main thread wait until child thread finishes, which I have done using `join`. But, it makes execution of thread one after another. Can anybody help me how to solve this ? Another point is that, I want to share a variable (named as cnt which found number of matches in files)among two threads which I have done using Global class to found total number of matches. Is there any other nice solution ?
0
[ 2, 8247, 1889, 96, 10647, 1760, 163, 850, 20396, 1327, 800, 3726, 3726, 31, 57, 249, 8247, 1797, 45, 9010, 8247, 9, 1963, 9, 2483, 73, 718, 2062, 1, 317, 12038, 19, 38, 21, 800, 713, 13, 73, 317, 12038, 19, 38, 334, 800, 713, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Firefox image button onmouseover event doesn't fire === quick question. I've replaced the buttons on my site with my own pretty PNG's. Then just wrapped the image in a submit button markup. Easy peasy right? For clarity... <button type='submit' style='border: 0; background: transparent;'> <[img tag here] /> </button> Then to make them feel interactive, there's a secondary button with a slightly different lighting effect for the image onmouseover event. Everything works great with chrome but not with firefox. For the record, I have the same setup with some anchor tags which DO work in firefox, so it's specific to the submit buttons. It looks like firefox is trapping the onmouseover event in the button node, and it doesn't reach the image tag. Suggestions? *NOTE* the onmouseover is coded into the html tag itself. I would really prefer not to have to move the code to a separate listener (too many buttons, this feels cleaner for me). Thanks for your time in advance!
0
[ 2, 535, 18219, 1961, 5167, 27, 14002, 62, 2549, 807, 1437, 22, 38, 535, 800, 3726, 3726, 2231, 1301, 9, 31, 22, 195, 1141, 14, 12861, 27, 51, 689, 29, 51, 258, 1772, 351, 2723, 22, 18, 9, 94, 114, 3684, 14, 1961, 19, 21, 12298...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Mac Mountain Lion send notification from CLI app === How can I send a notification to the notification center from a command line app? My attemps so far compile and run, but don't succeed in notifying me. Example #import <Cocoa/Cocoa.h> int main(int argc, const char * argv[]) { NSLog(@"Running notifications"); NSUserNotification *note = [[NSUserNotification alloc] init]; [note setTitle:@"Test"]; [note setInformativeText:@"Woot"]; NSUserNotificationCenter *center = [NSUserNotificationCenter defaultUse$ [center scheduleNotification: note]; return 0; } I then compile like: clang -framework cocoa /tmp/Notes.m and I get 2012-07-29 16:08:35.642 a.out[2430:707] Running notifications as output, but no notification :( Is codesigning a factor in this?
0
[ 2, 1572, 1286, 6023, 2660, 52, 4634, 37, 19391, 4865, 800, 3726, 3726, 184, 92, 31, 2660, 21, 52, 4634, 20, 14, 52, 4634, 459, 37, 21, 1202, 293, 4865, 60, 51, 35, 9577, 18, 86, 463, 26561, 17, 485, 15, 47, 221, 22, 38, 7952, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
nServiceBus saga nHibernate === I'm new to nServiceBus. nServiceBus version: **2.6.0.1505** I want to persist saga in database. Why this doesn't work: public class MessageEndpoint : IConfigureThisEndpoint, AsA_Server, IWantCustomInitialization { public void Init() { Configure.With().DefaultBuilder().Sagas().NHibernateSagaPersister(); } } It throws an error: > Exception occurred in > Topshelf.Internal.ServiceController`1[[NServiceBus.Host.Internal.GenericHost, > NServiceBus.Host, Version=2.6.0.1505, Culture=neutral, > PublicKeyToken=9fc386479f8a226c]] during state Initial while handling > OnStart How can I fix it? Is it possible in this version of nServiceBus?
0
[ 2, 13, 103, 11449, 3822, 10003, 12109, 15191, 8820, 800, 3726, 3726, 31, 22, 79, 78, 20, 13, 103, 11449, 3822, 9, 13, 103, 11449, 3822, 615, 45, 13, 1409, 135, 9, 379, 9, 387, 9, 9839, 264, 1409, 31, 259, 20, 22084, 10003, 19, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
opencv matrix brace operator === I've noticed in many examples/tutorials that people use the brace operator "()" for matrix access, which is confusing for me in some cases. The question is: Let's assume we have a n*m matrix (3x4, for example) named M. What elements will be returned by accessing it via "M(0)", or "M(1)", or any other singular parameter inside the braces? I thought that you are supposed to specify both the row and the column (like "M(0,1)" or something like that).
0
[ 2, 368, 12732, 8187, 15646, 6022, 800, 3726, 3726, 31, 22, 195, 2711, 19, 151, 3770, 118, 2473, 9819, 192, 18, 30, 148, 275, 14, 15646, 6022, 13, 7, 5, 6, 7, 26, 8187, 1381, 15, 56, 25, 18084, 26, 55, 19, 109, 1871, 9, 14, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
PHP money_format: issues with values 0.00/0.50/.50 === I am currently validating US Currency along with a decimal number format. I am using the function `money_format`but the issues is that certain values is returning an error. How can i have the function work when the input value is `0.00` or `0.50`? [Example][1] **PHP** if (isset($_POST['price'])){ $price = $_POST['price']; $priceString = empty($price['price'])?null:trim($price['price']); if(!empty($priceString)) { $price = str_replace("$", "", $price); if (preg_match('/^[+\-]?\d+(\.\d+)?$/', $price)){ echo ('<div id="price"><span id="resultval"><h2>Price:</h2>'.money_format('%n', $price).'</span></div>'); } else { echo ('<div id="price"><span id="resultval"><h2>Price:</h2><div class="errorMessage">Enter a valid number in US currency format.</div></span></div>'); } } else { echo ''; } } [1]: http://webprolearner.ueuo.com/dropdown-menu/test1.php
0
[ 2, 13, 26120, 875, 1, 23588, 45, 1549, 29, 4070, 713, 9, 2032, 118, 387, 9, 2290, 118, 9, 2290, 800, 3726, 3726, 31, 589, 871, 7394, 1880, 182, 10507, 303, 29, 21, 26380, 234, 2595, 9, 31, 589, 568, 14, 1990, 13, 1, 22520, 1, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Execute file with SQLExec containing $$ characters === I've created a sql dump file using pg_dump. This export file contains functions which contain $$ characters. No problem to import the file with psql -f < filename>. If want to import the file with ant using the SQLExec task, I get an exception like: org.postgresql.util.PSQLException: ERROR: syntax error at or near "$" Is there a way to import a file containing $$? Here my method protected void importNewDbFromDumpFile() { final class SqlExecuter extends SQLExec { public SqlExecuter() { Project project = new Project(); project.init(); setProject(project); setTaskType("sql"); setTaskName("sql"); } } try { SqlExecuter executer = new SqlExecuter(); executer.setSrc(new File(dbDumpFileLocation)); executer.setClasspath(createClasspath()); executer.setEscapeProcessing(true); executer.setDriver("org.postgresql.Driver"); executer.setUrl("jdbc:postgresql://localhost/test"); executer.setPassword("test"); executer.setUserid("manager"); executer.execute(); } catch (Exception e) { log.info("Exception importing database ...", e); } }
0
[ 2, 15644, 3893, 29, 4444, 20718, 3319, 3503, 5579, 4403, 1766, 800, 3726, 3726, 31, 22, 195, 679, 21, 4444, 255, 11424, 3893, 568, 13, 9623, 1, 43, 11134, 9, 48, 7487, 3893, 1588, 3719, 56, 3717, 5579, 4403, 1766, 9, 90, 1448, 20,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
pro android augmentation chapter 8 example throwing a NoClassDefFoundError === I have compiled the example for android pro development chapter 8. I am receiving this error when I try and run one of the patterns on the phone. 07-29 21:00:06.378: E/AndroidRuntime(19501): FATAL EXCEPTION: main 07-29 21:00:06.378: E/AndroidRuntime(19501): java.lang.NoClassDefFoundError: com.paar.ch8.ModelViewer 07-29 21:00:06.378: E/AndroidRuntime(19501): at com.paar.ch8.ModelChooser.onListItemClick(ModelChooser.java:91) 07-29 21:00:06.378: E/AndroidRuntime(19501): at android.app.ListActivity$2.onItemClick(ListActivity.java:319) 07-29 21:00:06.378: E/AndroidRuntime(19501): at android.widget.AdapterView.performItemClick(AdapterView.java:284) 07-29 21:00:06.378: E/AndroidRuntime(19501): at android.widget.ListView.performItemClick(ListView.java:3763) 07-29 21:00:06.378: E/AndroidRuntime(19501): at android.widget.AbsListView$PerformClick.run(AbsListView.java:1936) 07-29 21:00:06.378: E/AndroidRuntime(19501): at android.os.Handler.handleCallback(Handler.java:587) 07-29 21:00:06.378: E/AndroidRuntime(19501): at android.os.Handler.dispatchMessage(Handler.java:92) 07-29 21:00:06.378: E/AndroidRuntime(19501): at android.os.Looper.loop(Looper.java:123) 07-29 21:00:06.378: E/AndroidRuntime(19501): at android.app.ActivityThread.main(ActivityThread.java:3687) 07-29 21:00:06.378: E/AndroidRuntime(19501): at java.lang.reflect.Method.invokeNative(Native Method) 07-29 21:00:06.378: E/AndroidRuntime(19501): at java.lang.reflect.Method.invoke(Method.java:507) 07-29 21:00:06.378: E/AndroidRuntime(19501): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:842) 07-29 21:00:06.378: E/AndroidRuntime(19501): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600) 07-29 21:00:06.378: E/AndroidRuntime(19501): at dalvik.system.NativeStart.main(Native Method)
0
[ 2, 895, 13005, 23614, 857, 1260, 469, 823, 6033, 21, 90, 1898, 13862, 12235, 29992, 800, 3726, 3726, 31, 57, 9316, 14, 823, 26, 13005, 895, 522, 1260, 469, 9, 31, 589, 3396, 48, 7019, 76, 31, 1131, 17, 485, 53, 16, 14, 6282, 27,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How can I add a derived column to my Yii model? === In Yii, I need to add a "derived" column to any resultset from my model. The column doesn't actually exist in the database table. For example, say I have an `Activity` model. There are only two types of Activities: (1) Income, or (2) Expense. If I want to add a column called `income_total` or `expense_total` (depending on what *type* of activity is being accessed), how would I do that? Here's a working example of an `Activity` model in Ruby on Rails (I'm basically wondering how to do the same thing, but in Yii): class Activity < ActiveRecord::Base attr_accessible :name, :effective_at, :amount, :category scope :incomes, :conditions => { :category => 'Income' } scope :expenses, :conditions => { :category => 'Expense' } def self.incomes_total incomes.sum :amount end def self.expenses_total expenses.sum :amount end end Kind regards Tim
0
[ 2, 184, 92, 31, 3547, 21, 3981, 4698, 20, 51, 7679, 49, 1061, 60, 800, 3726, 3726, 19, 7679, 49, 15, 31, 376, 20, 3547, 21, 13, 7, 25891, 7, 4698, 20, 186, 1736, 1198, 37, 51, 1061, 9, 14, 4698, 1437, 22, 38, 1121, 3182, 19,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Can somebody figure out the error? === I am rendering a form. The form has check-box for the particular label and one text field for the ip address. I am creating a dictionary with keys being the label which are hardcoded in the list_key and values for the dictionary are taken from the form input (list_value). The dictionary is created but it is preceded by u for some values. here is the sample output for the dictionary: {u'1': {'broadcast': u'on', 'arp': '', 'webserver': '', 'ipaddr': u'', 'dns': ''}} can someone please explain what I am doing wrong. I am not getting the error when i simulate similar method in pyscripter. Any suggestions to improve the code are welcome. Thank you #!/usr/bin/env python # # Copyright 2007 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # import webapp2 import itertools import cgi form =""" <form method="post"> FIREWALL <br><br> <select name="profiles"> <option value="1">profile 1</option> <option value="2">profile 2</option> <option value="3">profile 3</option> </select> <br><br> Check the box to implement the particular policy <br><br> <label> Allow Broadcast <input type="checkbox" name="broadcast"> </label> <br><br> <label> Allow ARP <input type="checkbox" name="arp"> </label><br><br> <label> Allow Web traffic from external address to internal webserver <input type="checkbox" name="webserver"> </label><br><br> <label> Allow DNS <input type="checkbox" name="dns"> </label><br><br> <label> Block particular Internet Protocol address <input type="text" name="ipaddr"> </label><br><br> <input type="submit"> </form> """ dictionarymain={} class MainHandler(webapp2.RequestHandler): def get(self): self.response.out.write(form) def post(self): # get the parameters from the form profile = self.request.get('profiles') broadcast = self.request.get('broadcast') arp = self.request.get('arp') webserver = self.request.get('webserver') dns =self.request.get('dns') ipaddr = self.request.get('ipaddr') # Create a dictionary for the above parameters list_value =[ broadcast , arp , webserver , dns, ipaddr ] list_key =['broadcast' , 'arp' , 'webserver' , 'dns' , 'ipaddr' ] #self.response.headers['Content-Type'] ='text/plain' #self.response.out.write(profile) # map two list to a dictionary using itertools adict = dict(zip(list_key,list_value)) self.response.headers['Content-Type'] ='text/plain' self.response.out.write(adict) if profile not in dictionarymain: dictionarymain[profile]= {} dictionarymain[profile]= adict #self.response.headers['Content-Type'] ='text/plain' #self.response.out.write(dictionarymain) def escape_html(s): return cgi.escape(s, quote =True) app = webapp2.WSGIApplication([('/', MainHandler)], debug=True)
0
[ 2, 92, 8861, 1465, 70, 14, 7019, 60, 800, 3726, 3726, 31, 589, 15307, 21, 505, 9, 14, 505, 63, 2631, 8, 5309, 26, 14, 1498, 1899, 17, 53, 1854, 575, 26, 14, 15735, 3218, 9, 31, 589, 2936, 21, 9186, 29, 5534, 142, 14, 1899, 5...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Bundling and minification is sending old styles === I was followed this article to setup bundling and minification, http://www.asp.net/mvc/tutorials/mvc-4/bundling-and-minification. I thought it was working great, until I updated some css, but I kept getting the old style. I am working in firefox, I have cleared my cache, restarted my browser, restarted IIS, and even restarted my computer, and nothing is working. When I turn off bundling and minification BundleTable.EnableOptimizations = false; The new styles show up and the page looks as it should. Turn bundling and minification back on and I get the old styles again. Also, whenever I rebuild or change one of the css files, there is is a new chache busting token. So you would think that it is sending different content, but I still get the old stuff. I even added a test class to one of the css files, then downloaded the minified css file, but the test class I added is not there. Has anyone else run into this problem?
0
[ 2, 5502, 11371, 17, 4232, 4634, 25, 4907, 315, 6443, 800, 3726, 3726, 31, 23, 709, 48, 2002, 20, 18161, 5502, 11371, 17, 4232, 4634, 15, 7775, 6903, 6483, 9, 472, 306, 9, 2328, 118, 79, 8990, 118, 2473, 9819, 192, 18, 118, 79, 8...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
My PHP generated CSV file is saving as a PHP file === Ilearned how to create CSV files from MySQL data from another StackOverflow question. My problem is, for some reason when I call this code, it tries to save a file called index.php (which is the current page). Inside the index.php file my data from the table is there, separated by commas. I'm guessing I have a small typo somewhere, but after playing with the code I cannot find it. Thanks to anyone who can help. $result=mysql_query("SELECT * from tbl_email"); if(mysql_num_rows($result)) { //$unicode_str_for_Excel = chr(255).chr(254).mb_convert_encoding( $utf8_str, 'UTF-16LE', 'UTF-8'); header ("Content-type: application/csv Content-Disposition:\"inline; filename=messages.csv\""); //header ("Content-type: application/vnd.ms-excel; charset=UTF-16LE" ); echo"REF #,Company,Name,Email,Message,Date\n"; while($row = mysql_fetch_row($result)) { $companyname = mysql_query("SELECT company FROM tbl_users WHERE user_id ='$row[1]'"); $datname = mysql_fetch_array( $companyname ); echo"$row[7],$datname[company],$row[2],$row[4],$row[5],$row[6]\n"; }die(); }
0
[ 2, 51, 13, 26120, 6756, 272, 18, 710, 3893, 25, 7599, 28, 21, 13, 26120, 3893, 800, 3726, 3726, 13, 3599, 10818, 69, 184, 20, 1600, 272, 18, 710, 6488, 37, 51, 18, 22402, 1054, 37, 226, 7566, 2549, 9990, 1301, 9, 51, 1448, 25, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Android: Retrive Binded Value of a Spinner === <br/> I want to get Selected Value of a spinner. <br/> First, i created STRING-ARRAY in res/values/string <string-array name="location"> <item name="AUH">ABU DHABI</item> <item name="AAN">AL AIN</item> <item name="DMM">DAMMAM</item> </string-array> Spinner Definition in Layout: <Spinner android:id="@+id/spnOrigin" android:layout_width="fill_parent" android:layout_height="wrap_content" android:entries="@array/location"/> Now i need to complete the button click body, if user selects ABU DHABHI, he should return AUH <br/> GETSELECTITEM returns ABU DHABI, not the value behind this.. if i tries something like this, can this approach allow me to get NAME attribute? String[] _location =getResources().getStringArray(R.array.location); Button Handler: bttProcess.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { // Please help out to get solution of this problem. }); <br/> BR,<br/> Salik
0
[ 2, 13005, 45, 302, 3367, 195, 10193, 69, 1923, 16, 21, 3310, 1031, 800, 3726, 3726, 13, 1, 5145, 118, 1, 31, 259, 20, 164, 1704, 1923, 16, 21, 3310, 1031, 9, 13, 1, 5145, 118, 1, 64, 15, 31, 679, 3724, 8, 8576, 93, 19, 10719...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
What is the node repl outputting here? === What are all these properties? Are they properties or methods or what? They look like labels. super_, fail, equal (equal to what?), deepequal, what do they mean? How do you access these properties|methods|whatever they are called? Are they specific to node? // $ node #start the node repl // > assert //outputs the below { [Function: ok] AssertionError: { [Function: AssertionError] super_: { [Function: Error] captureStackTrace: [Function: captureStackTrace], stackTraceLimit: 10 } }, fail: [Function: fail], ok: [Circular], equal: [Function: equal], notEqual: [Function: notEqual], deepEqual: [Function: deepEqual], notDeepEqual: [Function: notDeepEqual], strictEqual: [Function: strictEqual], notStrictEqual: [Function: notStrictEqual], throws: [Function], doesNotThrow: [Function], ifError: [Function] }
0
[ 2, 98, 25, 14, 15421, 302, 5727, 5196, 1203, 235, 60, 800, 3726, 3726, 98, 50, 65, 158, 3704, 60, 50, 59, 3704, 54, 3195, 54, 98, 60, 59, 361, 101, 13173, 9, 1026, 1, 15, 7476, 15, 2747, 13, 5, 62, 14512, 20, 98, 60, 6, 15...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Group users by age for a range === I have some data which i need to make some statistics. I need to group the users by age. var byAge = displayResult.GroupBy(x => x.Age); Which i can do as above. However, this gives me ages like 19, 20, 21 etc. what I want is grouping age by 10 years, such as users between 10-20 yearsold, 20-30 years old, 30-40 years old etc. How can i get that?
0
[ 2, 214, 3878, 34, 348, 26, 21, 978, 800, 3726, 3726, 31, 57, 109, 1054, 56, 31, 376, 20, 233, 109, 5818, 9, 31, 376, 20, 214, 14, 3878, 34, 348, 9, 4033, 34, 1303, 800, 3042, 29955, 9, 8024, 779, 5, 396, 800, 1, 993, 9, 13...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Floating point bug when writing to file in Matlab? === Im not sure if Im missing something simple but the following code fails (a and b are meant to be the same): a=single(2147483584) f=fopen('test','wb'); fwrite(f,a,'int32') fclose(f); f=fopen('test','rb'); b=fread(f,inf,'int32'); fclose(f) a b and the following code succeeds a=single(2147483583) f=fopen('test','wb'); fwrite(f,a,'int32') fclose(f); f=fopen('test','rb'); b=fread(f,inf,'int32'); fclose(f) a b Does anyone know why?
0
[ 2, 8319, 454, 6256, 76, 1174, 20, 3893, 19, 4277, 9086, 60, 800, 3726, 3726, 797, 52, 562, 100, 797, 2863, 301, 1935, 47, 14, 249, 1797, 13614, 13, 5, 58, 17, 334, 50, 1380, 20, 44, 14, 205, 6, 45, 21, 3726, 14031, 5, 135, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
document.getElementById(foo).value with html encoded special characters? === I can't seem to be able to render special chracters in a simple input textfield properly. For instance in the following &#233; should be &#233; but renders as the raw value document.getElementById("inputKeyword").value ="Cherchez par mot cl&#233;
0
[ 2, 4492, 9, 3060, 27567, 779, 1340, 5, 4120, 111, 6, 9, 15165, 29, 13, 15895, 13665, 621, 1766, 60, 800, 3726, 3726, 31, 92, 22, 38, 2260, 20, 44, 777, 20, 16535, 621, 6193, 5797, 6052, 19, 21, 1935, 6367, 1854, 1109, 7428, 9, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Don't highlighte the cursor in the Codemirror when invoke find next in IE === I use CodeMirror for highlighte xml. It makes search perfect, but when i try _find next_ cursor not highlighted in IE8(in others version I have not tried). Has anyone had similar problems? It also does not work in the demo(Use IE8): http://codemirror.net/demo/search.html
0
[ 2, 221, 22, 38, 14373, 62, 14, 29588, 19, 14, 1797, 8635, 139, 248, 76, 28371, 477, 328, 19, 13, 660, 800, 3726, 3726, 31, 275, 1797, 8635, 139, 248, 26, 14373, 62, 23504, 9, 32, 1364, 2122, 2107, 15, 47, 76, 31, 1131, 13, 1, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to implement callback function in NPAPI Plugin === I am developing NPAPI Plugin for embedded native browser (Linux) . I want one callback function from javascript that will invoke callback function in my plugin . As per the events generated by pressing the keys of keyboard . I have to send events continously to the browser window. I am completely new to this needs help . Thanks in advance .
0
[ 2, 184, 20, 8713, 645, 1958, 1990, 19, 13, 103, 1060, 2159, 10922, 108, 800, 3726, 3726, 31, 589, 3561, 13, 103, 1060, 2159, 10922, 108, 26, 12138, 1275, 16495, 13, 5, 1226, 7147, 6, 13, 9, 31, 259, 53, 645, 1958, 1990, 37, 8247...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
jquery not post data in IE === i create one simple form in which i have one combobox when i am selecting any thing i put one function onchange event so its call. then i send this data in one helper file through jquery <script type="text/javascript"> $.noConflict(); function Searchwine(obj,str) { {queryString: ""+str+""}, function(data){ jQuery.post("http://www.site.com/search/helper/autosuggest.php", {queryString: ""+str+""}, function(data){ if(data.length >0) { jQuery('#windatano').html(data); } </script> i am using this code for post data in autosuggest from through javascript and print replay of jquery in windatano `id` --> its working fine in crome and ff and other all browser but in IE its not working Can any help? Thanks,
0
[ 2, 487, 8190, 93, 52, 678, 1054, 19, 13, 660, 800, 3726, 3726, 31, 1600, 53, 1935, 505, 19, 56, 31, 57, 53, 22621, 5309, 76, 31, 589, 20764, 186, 584, 31, 442, 53, 1990, 27, 16229, 807, 86, 82, 645, 9, 94, 31, 2660, 48, 1054...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Declarative authorization does accept role_symbols === I'm using rails 3.1 with devise and declarative authorization. def role_symbols return role = [:guest, :gramsevak] end And I receive following error message whenever I try to access controllers having filter_resource_access in them. User object doesn't respond to roles (#<User id: 3, username: "varade.vivek.123@gmail.com", password_hash: "fe4c8e2b4dd1dfc7fa55b3a375613318a8f69bf6", password_salt: "8c091073b4700f078c35518d549e460ed92d32a6", villege_id: nil, created_at: "2012-07-27 20:29:27", updated_at: "2012-07-30 18:18:37", email: "varade.vivek.123@gmail.com", encrypted_password: "$2a$10$ZJELlqBRVfNcfeQ20hPjiei.YQ.jZXHBimfvUau1CYs0...", reset_password_token: nil, reset_password_sent_at: nil, remember_created_at: nil, sign_in_count: 14, current_sign_in_at: "2012-07-30 18:18:37", last_sign_in_at: "2012-07-30 17:29:13", current_sign_in_ip: "127.0.0.1", last_sign_in_ip: "127.0.0.1", role: "gramsevak">)
0
[ 2, 121, 12078, 3366, 22677, 630, 3440, 597, 1, 7261, 6966, 18, 800, 3726, 3726, 31, 22, 79, 568, 2240, 18, 203, 9, 165, 29, 29276, 17, 121, 12078, 3366, 22677, 9, 6312, 597, 1, 7261, 6966, 18, 788, 597, 800, 636, 45, 22695, 15, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
send current location periodically in XMPP === I am trying to send user's current location from android to the server and other mobile device. And to implement that i am using XMPP. so far i have successfully made a connection with the XMPP server from android using asmack library. but now i don't know how can i send the current location of user to server and other android mobile device. while searching i came across this [XEP-0080][1] , but i don;t know how to use it. so far i am planning to do 1) connect with an XMPP server 2) get the connected or online users 3) share the location with all of them so can anyone suggest me the road map to that ? [1]: http://xmpp.org/extensions/xep-0080.html/
0
[ 2, 2660, 866, 1474, 19886, 19, 993, 79, 3421, 800, 3726, 3726, 31, 589, 749, 20, 2660, 4155, 22, 18, 866, 1474, 37, 13005, 20, 14, 8128, 17, 89, 3241, 3646, 9, 17, 20, 8713, 30, 31, 589, 568, 993, 79, 3421, 9, 86, 463, 31, 5...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
PIL image.open() working for some images but not others === I use PIL to open AREA files from NOAA on a regular basis. In the last batch of images I received, the image.open() command simply does not work. Here is a simple code I wrote which yields the same results. It will open, rotate, and perform normal tasks with a file from a month ago, and not with a file from today. from PIL import Image im = Image.open("path/to/file") im.show() Here's the error: File "image_goes.py", line 2, in <module> im = Image.open("path/to/file") File "/usr/lib/python2.6/dist-packages/PIL/Image.py", line 1980, in open raise IOError("cannot identify image file") IOError: cannot identify image file Here's what I have tried: 1. Opening the image on two separate machines. 2. Changing the folder of the file in case there was a permission problem 3. Redownloading the image, as well as two other batches, both using FTP manually AND our automatic script. My hypothesis was that there was a problem with our downloading script and that it was not fully downloading the file, but that hypothesis is rejected by the fact that the new files are the correct size and that I manually downloaded them using an FTP client and got the same results. My only other theory is that there is a problem with the NOAA files today or that they have been changed in such a way that PIL can no longer handle them, but I find that unlikely. Any help greatly appreciated, Thanks
0
[ 2, 8483, 1961, 9, 10157, 5, 6, 638, 26, 109, 3502, 47, 52, 654, 800, 3726, 3726, 31, 275, 8483, 20, 368, 217, 6488, 37, 90, 6887, 27, 21, 1290, 2239, 9, 19, 14, 236, 13064, 16, 3502, 31, 420, 15, 14, 1961, 9, 10157, 5, 6, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Detect software uninstallation on Windows === I would like to log the uninstall event onto my own web-server for my desktop application. Is there a way I can detect the uninstallation on Windows?
0
[ 2, 9092, 2306, 367, 108, 21300, 857, 27, 1936, 800, 3726, 3726, 31, 83, 101, 20, 6738, 14, 367, 108, 21300, 807, 1204, 51, 258, 2741, 8, 10321, 106, 26, 51, 17404, 3010, 9, 25, 80, 21, 161, 31, 92, 9092, 14, 367, 108, 21300, 8...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
Is it possible to convert mex code to C++ code? === I have written some mex code, i have used mxArrays, and few other Matlab functions, i am wondering is it possible to convert it to C++ code easily by including the appropriate header and making some minor changes ?
0
[ 2, 25, 32, 938, 20, 8406, 55, 396, 1797, 20, 272, 20512, 1797, 60, 800, 3726, 3726, 31, 57, 642, 109, 55, 396, 1797, 15, 31, 57, 147, 307, 396, 8576, 93, 18, 15, 17, 310, 89, 4277, 9086, 3719, 15, 31, 589, 5712, 25, 32, 938,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Bash script passes syntax check, but errors out with missing ']' === I'm putting together a simple backup script that will tar contents of a folder, then move that file to a backup server. The script makes sure that the tar file exists and is not zero bytes before moving around. The problem is that the script is dying on one of the IF lines if [ -f /www/archives/pdf/pdf_201207021048.tar && 11294720 -gt 0 ]; then echo "tar file exists and is greater than 0 bytes." else echo "tar file does not exist or is zero bytes" fi The error in the console is: ./backup_pdf.sh: line 49: [: missing `]' Line 49 is the if statement above. The script is successfully verified with bash -n backup.sh What's wrong that bash is seeing a missing ']', yet it passes the syntax check?
0
[ 2, 13158, 3884, 3789, 22649, 2631, 15, 47, 11908, 70, 29, 2863, 13, 22, 500, 22, 800, 3726, 3726, 31, 22, 79, 3873, 429, 21, 1935, 10119, 3884, 30, 129, 2475, 8478, 16, 21, 19294, 15, 94, 780, 30, 3893, 20, 21, 10119, 8128, 9, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Drupal7 WYSIWYG module CKEDITOR, custom buttons === I have installed WYSIWYG module and added CKEditor library to it. Also I have GESHI Filter module for code highlighting. Everything works just great except one thing: I have to switch to source mode to manually add <code lang="lang"></code> tags, and then switch back to write code into this block. I would like to add a button to the CKEditor panel that will insert <code> block with ability to select language that should be inserted as value for lang attribute, but I cannot realize how to do it. It seems that sites/all/libraries/ckeditor/config.js is completely ignored by WYSIWYG module. Maybe there is a hook that I could use in my theme's template.php ?
0
[ 2, 15708, 6720, 465, 5809, 18, 49, 7913, 263, 12613, 13, 2601, 13401, 15, 5816, 12861, 800, 3726, 3726, 31, 57, 4066, 5809, 18, 49, 7913, 263, 12613, 17, 905, 13, 2601, 13401, 1248, 20, 32, 9, 67, 31, 57, 3168, 3528, 11945, 12613,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
POSIX-compatible regex library for Visual Studio C === I'm working on a C program which will be run in Linux and from inside Visual Studio 2010, and I'm looking for a regex library. GNU comes with a POSIX-compatible regex library, but Visual Studio, despite having C++ std::regex, doesn't have a C-compatible library. GNU has a Windows version of their library (http://gnuwin32.sourceforge.net/packages/regex.htm), but the DLLs are 32-bit only and the source code can't compile in Visual Studio (~500 errors!). My only requirement is that the end-user should not have to install anything extra, and should get the same behaviour on both platforms. I'm not picky about whether it's POSIX-style, Perl-style or something else. What should I do? Thanks in advance.
0
[ 2, 2353, 6742, 8, 20049, 7953, 1706, 1248, 26, 3458, 1120, 272, 800, 3726, 3726, 31, 22, 79, 638, 27, 21, 272, 625, 56, 129, 44, 485, 19, 13024, 17, 37, 572, 3458, 1120, 498, 15, 17, 31, 22, 79, 699, 26, 21, 7953, 1706, 1248, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Bind two images together to be dragged === I'm looking for some help with a script to drag two images together at once. I currently have a script that allows me to drag thumbnail images into a collection bin to be saved later. However, some of my thumbnails have an image positioned over the top of them to represent these thumbnail images as "unknown" plants. I was wondering if someone could point me in the right direction as to how I would go about binding these two images together to be dragged. Here is my code: $(document).ready(function() { var limit = 16; var counter = 0; $("#mainBin1, #mainBin2, #mainBin3, #mainBin4, #mainBin5, #bin_One_Hd, #bin_Two_Hd, #bin_Three_Hd, #bin_Four_Hd, #bin_Five_Hd").droppable({ accept: ".selector, .plant_Unknown", drop: function(event, ui) { counter++; if (counter == limit) { $(this).droppable("disable"); } $(this).append($(ui.draggable).clone()); $("#cbOptions").show(); $(".item").draggable({ containment: "parent", grid: [72,72], }); } }); $(".selector").draggable({ helper: "clone", revert: "invalid", revertDuration: 700, opacity: 0.75, }); $(".plant_Unknown").draggable({ helper: "clone", revert: "invalid", revertDuration: 700, opacity: 0.75, }); }); Any help would be greatly appreciated. Thanks. EDIT: [Website][1] [1]: http://www.plantcombos.com/html
0
[ 2, 10193, 81, 3502, 429, 20, 44, 7465, 800, 3726, 3726, 31, 22, 79, 699, 26, 109, 448, 29, 21, 3884, 20, 5501, 81, 3502, 429, 35, 382, 9, 31, 871, 57, 21, 3884, 30, 2965, 55, 20, 5501, 5078, 325, 947, 3502, 77, 21, 1206, 451...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Migrate Spring JPA DAO unit testing to google app engine === I'm trying to put together a simple environment where I can get Spring, Maven, JPA, Google App Engine and DAO unit testing working happily all together. The goal is to be able to run a simple DAO unit test creating an entity and then load it again with a simple find to check it's been created properly - all of this from my maven build. My dao is making use of the JPA entity manager (query(), persist(), etc.) I've got it working no problem with hsqldb and a datasource, etc. but I'm struggling to get it working with appengine. My questions are: 1) I'm using an entity manager, injecting my persistence unit as followed. Is it OK? Is there any need for a datasource or something special? I thought not but correct me if I'm wrong. applicationContext.xml <bean id='entityManagerFactory' class='org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean'> <property name="persistenceUnitName" value="transactions-optional" /> </bean> Persistence.xml <persistence-unit name="transactions-optional"> <provider>org.datanucleus.store.appengine.jpa.DatastorePersistenceProvider</provider> <properties> <property name="datanucleus.NontransactionalRead" value="true"/> <property name="datanucleus.NontransactionalWrite" value="true"/> <property name="datanucleus.ConnectionURL" value="appengine"/> </properties> </persistence-unit> 2) what are the dependencies I need to add to my pom file to be able to run the unit test making use of the entityManager? What about versions ? I found loads of things about appengine-api-labs/stubs/testing but none them got it working i.e. I'm getting jdo dependency missing while I'm using JPA... I also get loads of conflicts when I try to add some jars (datanucleus and stuff). So far I'm trying appengine-api-1.0-sdk v1.7.0 -> ASM-all v3.3 -> datanucleus core/api-jpa/enhancer v3.1.0 -> datanucleus-appengine v2.0.1.1 and all the gae testing jars v1.7.0 3) Is there anything I need to add to my surefire plugin (test runner) to make sure it picks up all the dependencies? I'm getting an exhausting ClassNotFound on DatastorePersistenceProvider while it is in my classpath (I checked the jars and the mvn dependency:tree) I had a look at this but it doesn't seem to be working at all: http://www.vertigrated.com/blog/2011/02/working-maven-3-google-app-engine-plugin-with-gwt-support/ 4) Do I need to use any sot of localhelper to test my DAOs? Ideally I'd want to test my dao layer "as is" with the entity manager... what's your opinion ? Has anyone managed to run a unit test using JPA on google app engine ? 5) Do I need to set up any sort of gae.home somewhere in my pom file? Would anyone make use of it (a plugin or something) ? 6) Is the gwt-maven plugin any helpful if I don't use gwt - I'm writing a simple webservice making use of appengine, not a GWT app... Any help would be much appreciated as I've been struggling for 2 days now... Cheers, V.
0
[ 2, 22985, 1573, 487, 1060, 13, 17104, 1237, 4431, 20, 8144, 4865, 1406, 800, 3726, 3726, 31, 22, 79, 749, 20, 442, 429, 21, 1935, 2307, 113, 31, 92, 164, 1573, 15, 1216, 3124, 15, 487, 1060, 15, 8144, 4865, 1406, 17, 13, 17104, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
FragmentStatePagerAdapter IllegalStateException: <MyFragment> is not currently in the FragmentManager === I'm getting this on some cases, when going back to the activity, which uses a FragmentStatePagerAdapter, using back button of the devices. Not always. Not reproducible. I'm using support package v4, last revision (8). Already searched with google, no success finding a useful answer. Looking in the source, it's thrown here: FragmentManager.java @Override public void putFragment(Bundle bundle, String key, Fragment fragment) { if (fragment.mIndex < 0) { throw new IllegalStateException("Fragment " + fragment + " is not currently in the FragmentManager"); } bundle.putInt(key, fragment.mIndex); } But why is the index of fragment < 0 there? The code instantiating the fragments: @Override public Fragment getItem(int position) { Fragment fragment = null; switch(position) { case 0: fragment = MyFragment.newInstance(param1); break; case 1: fragment = MyFragment2.newInstance(param2, param3); break; } return fragment; } @Override public int getCount() { return 2; } I also can't debug through the source since the support package doesn't let me attach the source, for some reason... but that's a different question...
0
[ 2, 14847, 3859, 6486, 12779, 12689, 5143, 3859, 10066, 872, 45, 13, 1, 915, 22133, 1130, 1, 25, 52, 871, 19, 14, 14847, 22256, 800, 3726, 3726, 31, 22, 79, 1017, 48, 27, 109, 1871, 15, 76, 228, 97, 20, 14, 2358, 15, 56, 2027, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
deleting a word starting with a specific letter/character php === here is a simple example: $correction = "game"; $text ="Hello this is an example of a $word that starts with a $dollar sign"; $text = str_replace("\$word",$correct,$text); if I echo $text it will say : hello this is an example of a game that starts with a dollar sign. that works just fine. Now I want to be able to change any word that starts with a dollar sign into game so it will change all the words that start with $ and turn them into the word "game" any ideas please ?
0
[ 2, 121, 1336, 68, 21, 833, 1422, 29, 21, 1903, 1748, 118, 24589, 13, 26120, 800, 3726, 3726, 235, 25, 21, 1935, 823, 45, 5579, 25345, 872, 800, 13, 7, 5128, 7, 73, 5579, 11969, 800, 7, 11515, 48, 25, 40, 823, 16, 21, 5579, 958...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
In IE 7-9 containers starts to overlap/shrink after 2nd block === First, the images disapeared, I fixed by placing `<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />` in header, that's nice! Now the images are showing but overlaping after the 2nd block[ \[IMG\]][1]. Im'finding hard to solve this because can't install IE 7-9, I rely on emulators such netrenderer :( Header is `<!DOCTYPE html>` tried some other but anything change. Containers goes like this: <div class="post-container-odd" > <h2><a href="http://site.com/destinos/africa-ilhas/">África &amp; Ilhas</a></h2> <div class="thumbnail"><a href="http://site.com/destinos/africa-ilhas" title="Ilhas Maldivas"><img src="http://site.com/wp-content/uploads/2012/07/maldivas-22-380x200.jpg" title="" alt=""/></a></div> </div> <div class="post-container-even" > <h2><a href="http://site.com/destinos/america-do-norte-caribe/">América do Norte &amp; Caribe</a></h2> <div class="thumbnail"><a href="http://site.com/destinos/america-do-norte-caribe" title="Chicago"><img src="http://site.com/wp-content/uploads/2012/07/chicago-29-380x200.jpg" title="" alt=""/></a></div> </div> And CSS is just this: .post-container-even{float:left;margin:0 0 20px 0;display:table} .post-container-odd {float:left; margin: 0 5px 20px 0} Maybe place a `<div style="clear:both"></div>` every two iten can solve but that is quite lame? Thanks for any help [1]: http://img220.imageshack.us/img220/1146/clipboard02o.png
0
[ 2, 19, 13, 660, 453, 8, 518, 18988, 3244, 20, 15406, 118, 1635, 10603, 75, 172, 706, 1921, 800, 3726, 3726, 64, 15, 14, 3502, 1460, 2552, 21511, 15, 31, 3535, 34, 5861, 13, 1, 5909, 58, 7775, 8, 9629, 710, 3726, 7, 396, 8, 378...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
let user record shortcut in browser extension === Is there a simple way to add this kind of options to browser extension(I'm using the crossrider framework to build cross browser extension)? Users just need to type the shortcut they want and click the save button This is a screenshoot from the `send to kindle` chrome extension ![shortcut](http://i.imgur.com/Loi6U.png)
0
[ 2, 408, 4155, 571, 502, 4118, 19, 16495, 3896, 800, 3726, 3726, 25, 80, 21, 1935, 161, 20, 3547, 48, 825, 16, 6368, 20, 16495, 3896, 5, 49, 22, 79, 568, 14, 919, 22643, 6596, 20, 1895, 919, 16495, 3896, 6, 60, 3878, 114, 376, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Ignore the database duplicates when setting LIMIT with PDO === I want to ignore the duplicates in my database when I will set my "LIMIT 0, 50", then "LIMIT 50, 50" then LIMIT..... I will need to scan the duplicates on only 1 column of my table, not all the columns at once. I can't merge the duplicates because they are different in a way : these duplicates have different prices. more precisely, I will need to show a list of these items, but to show their different prices at their right. I need a precise number (50) per pages, so I cant load less then go to the next page. I could therefore load more from the beginning (changing the max and previous offsets if i'm on a far page) in a way that if i ignore the duplicates, I will got exactly 50 per pages and I will get the good number of pages shown at the end. I'm a bit beginner with PHP and I have no idea about how to do that. Maybe pre-scan all the table and then start writing my code, by being flexible with my scan's variables of LIMIT and everything ? what functions I need ? how ? Else, do something pre-programmed or a function of php that I don't know it exists can solve this problem ? Or I really need to get an headhache xD
0
[ 2, 7174, 14, 6018, 19429, 18, 76, 2697, 4496, 29, 351, 537, 800, 3726, 3726, 31, 259, 20, 7174, 14, 19429, 18, 19, 51, 6018, 76, 31, 129, 309, 51, 13, 7, 20565, 713, 15, 1222, 7, 15, 94, 13, 7, 20565, 1222, 15, 1222, 7, 94, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
The conversion of a varchar data type to a datetime data type resulted in an out-of-range value === i have the following piece of error when i try to run my programme. Is there anything wrong with my select statement ? int month=0; if (RadioButtonList1.SelectedIndex == 0) { month = 1; } else if(RadioButtonList1.SelectedIndex == 1) { month = 2; } else if(RadioButtonList1.SelectedIndex == 2) { month = 3; } SqlCommand cmd = new SqlCommand("SELECT thDate, thType, thAmountIn, thAmountOut from [Transaction] Where thDate > dateadd(month, -" + month + ", GETDATE())", myConnection); da = new SqlDataAdapter(cmd); myConnection.Open(); da.Fill(ds, "[Transaction]"); myConnection.Close(); if (!IsPostBack) { ViewState["vs_Transaction"] = (DataTable)ds.Tables["Transaction"]; GridView1.DataSource = ds.Tables["Transaction"]; GridView1.DataBind(); The below is my database table for thDate ![enter image description here][1] [1]: http://i.stack.imgur.com/4Pd6F.png
0
[ 2, 14, 6263, 16, 21, 4033, 5433, 1054, 1001, 20, 21, 1231, 891, 1054, 1001, 2923, 19, 40, 70, 8, 1041, 8, 8366, 1923, 800, 3726, 3726, 31, 57, 14, 249, 1855, 16, 7019, 76, 31, 1131, 20, 485, 51, 2866, 9, 25, 80, 602, 1389, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Checked binding using an object property in knockout js === [My first attempt at describing the issue was clear as mud; I significantly reworked it in the name of clarity. I hope I haven't failed miserably...again.] I'm attempting to set up a master/details view using knockout where the details pane includes a list of checkboxes. I have an array of User objects, each of which has in turn an array of UserPermission objects where the PermissionId property is what should determine if the checkbox is checked. So, in short: There's a master list of users, from which you select one to view details. In the details pane, I have a list of checkboxes (generated from a list of available permissions). Whether or not a given checkbox is checked should be determined by the persences of a matching PermissionId within the array of UserPermission objects associated with the current user. My question is - how do I get the checkboxes to use the user.UserPermissions.PermissionId for the checked binding? Here's a jsfiddle of [my attempt thus far][1], and here's [another approach I've tried][2]. [1]: http://jsfiddle.net/szcp2/3/ [2]: http://jsfiddle.net/R87Cg/2/
0
[ 2, 6505, 8728, 568, 40, 3095, 1354, 19, 11676, 487, 18, 800, 3726, 3726, 636, 915, 64, 1735, 35, 7153, 14, 1513, 23, 1207, 28, 5006, 73, 31, 5085, 27888, 32, 19, 14, 204, 16, 18314, 9, 31, 1376, 31, 2933, 22, 38, 1702, 2462, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Newbie: assignment makes integer from pointer without a cast [-Werror] === // set all values in the hash table to null for(int i = 0; i < HASH_SIZE; i++) { hashtable[i] = NULL; } I keep getting this error message in response to hashtable[i]: assignment makes integer from pointer without a cast [-Werror] Why?
0
[ 2, 78, 5893, 45, 8427, 1364, 13820, 37, 454, 106, 366, 21, 1325, 636, 8, 499, 29992, 500, 800, 3726, 3726, 12894, 309, 65, 4070, 19, 14, 19170, 859, 20, 16203, 26, 5, 6391, 31, 800, 713, 73, 31, 13, 1, 19170, 1, 10454, 73, 31,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Migration from C2DM to GCM === I reading this: http://developer.android.com/guide/google/gcm/c2dm.html, but I don't understand what I must do. Now my application doing registration in c2dm by this code: String pushId = C2DMessaging.getRegistrationId(this); if(pushId == "") { C2DMessaging.register(this, "email@gmail.com"); } What I must change in this code to do migration from c2dm to gcm?
0
[ 2, 8443, 37, 272, 135, 43, 79, 20, 489, 9095, 800, 3726, 3726, 31, 1876, 48, 45, 7775, 6903, 26051, 106, 9, 290, 18524, 9, 960, 118, 17599, 118, 16111, 4875, 118, 10362, 79, 118, 150, 135, 43, 79, 9, 15895, 15, 47, 31, 221, 22...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Best way to send emails with attachments in Struts 2 application === I want to know the internal or external plugins supporting email feature in struts 2 application. I am currently using Java Mail API to send email with attachment. But facing few issues in while deploying in various platforms. Is there any other better way to send emails in Struts 2 application?
0
[ 2, 246, 161, 20, 2660, 8517, 18, 29, 14575, 18, 19, 18316, 18, 172, 3010, 800, 3726, 3726, 31, 259, 20, 143, 14, 3117, 54, 4886, 10922, 108, 18, 3134, 8517, 1580, 19, 18316, 18, 172, 3010, 9, 31, 589, 871, 568, 8247, 4216, 21, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
I have my oauth-authentication-data backend. Can I add it as though it was posted front end? === I'm building a canvas app for facebook. Facebook *posts* the acesstoken and the rest of the oauth-stuff. I use a general purpose oauth-javascript-library. It works fine when the response comes back as a regular response. Looking at the code it seems as though the javascript get's the access_token from `window.location.hash` (the data looks something like this(linebreaks added): #state=37520edb-3114-4901-a150-1c5bfe77cc19 &access_token=AAADmtzfo7M4BAGHiIBtKhK4gWog5i1vaqPCZCYXHx96OTkaWxpIdfCuZAPXRIkrJkBdUFUNUb8aujirKImqpoIK1O2XxVYrS1ecoZBxlwZDZD &expires_in=3717 I read up on the window.location.hash, and it says the hash property returns the anchor portion of a URL, including the hash sign. It seems very weird that it's used like this. Facebook posts a json-object that looks like this: { "algorithm":"HMAC-SHA256", "expires":1341399600, "issued_at":1341393121, "oauth_token":"AAADmtzfo7M4BABVX97PZA5sdrWa0ZBRHEZAasZCVkVapiYRe0stZAZBF0Gi8PuvgfBa2ugRAfeH8zEFbGEzbIjeKt7ZAttyK1ZCxSwSZBdV4l6QZDZD", "user":{ "country":"se", "locale":"en_US", "age":{"min":21}}, "user_id":"651666483" } This is the oauth-library I'm using: [https://github.com/andreassolberg/jso/blob/master/jso.js][1] Why is the data saved in location.hash? How do I add the data from the json-post to the location.hash? What is the state variable? [1]: https://github.com/andreassolberg/jso/blob/master/jso.js
0
[ 2, 31, 57, 51, 635, 1346, 96, 8, 1346, 2504, 1786, 857, 8, 18768, 97, 2451, 9, 92, 31, 3547, 32, 28, 362, 32, 23, 6054, 431, 241, 60, 800, 3726, 3726, 31, 22, 79, 353, 21, 9696, 4865, 26, 9090, 9, 9090, 1637, 6962, 18, 2483,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Data Collection from Page === We are creating a business page/group for our business. We would like to collect user generated content/comments, likes, post etc from the group/page. Is it possible for us to get the required data in a .csv format for analytical purposes? Thanks
1
[ 2, 1054, 1206, 37, 2478, 800, 3726, 3726, 95, 50, 2936, 21, 508, 2478, 118, 8024, 26, 318, 508, 9, 95, 83, 101, 20, 5543, 4155, 6756, 2331, 118, 960, 6601, 15, 101, 18, 15, 678, 2722, 37, 14, 214, 118, 6486, 9, 25, 32, 938, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Rails efficiency on finding associations === I have an application with Users, Posts and Comments. Users has_many Posts, Posts has_many Comments and Comments belong_to Users and Posts. In my view template I'm looping over the Comments like this to get the username of the commenter: `User.find(comment.user_id).name` How efficient is this if I'm doing this for every Comment per Post ? I could imagine that it's maybe faster to store the username in a separate row in the Comments table, but duplicating the data seems just wrong. Am I being paranoid and is ActiveRecord doing some caching magic or is there a better way of doing something like this ?
0
[ 2, 2240, 18, 7836, 27, 3007, 10642, 800, 3726, 3726, 31, 57, 40, 3010, 29, 3878, 15, 9868, 17, 7534, 9, 3878, 63, 1, 14842, 9868, 15, 9868, 63, 1, 14842, 7534, 17, 7534, 6219, 1, 262, 3878, 17, 9868, 9, 19, 51, 1418, 22894, 31...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
cross browser local video player WITH lightbox === iv been looking around for ages, and I still can't find anything on this site, or elsewhere which solved my problem. There are heaps that do youtube and vimeo, but thats no good as i need local video There are heaps that do ogg + mp4 + swf fallback, but they don't have lightboxes. They embed in the page. i need a lightbox abilities which will allow me to play videos locally (ogg + mp4) with swf fallback. So like clicking on a thumbnail which then opens a lightbox. help!
0
[ 2, 919, 16495, 375, 763, 517, 29, 471, 5309, 800, 3726, 3726, 3761, 74, 699, 140, 26, 5520, 15, 17, 31, 174, 92, 22, 38, 477, 602, 27, 48, 689, 15, 54, 6040, 56, 15091, 51, 1448, 9, 80, 50, 15414, 18, 30, 107, 7330, 17, 1790...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
create a bitmap reflection that has a depth (perspective) in it === <b>Hello everyone ....</b> So far I've been able to create a flipped reflection of a bitmap .<b> <a href="http://dl.dropbox.com/u/23755950/updel.png">it looks like this</a></b> . But i want to create a perspective reflection<b><a href="http://dl.dropbox.com/u/23755950/updel2.png"> like this one</a></b> . Can anyone provide a snippet . Help appreciated ...
1
[ 2, 1600, 21, 1142, 15022, 9138, 30, 63, 21, 5204, 13, 5, 1432, 7350, 1284, 6, 19, 32, 800, 3726, 3726, 13, 1, 220, 1, 11515, 1266, 13, 9, 9, 9, 9, 1, 118, 220, 1, 86, 463, 31, 22, 195, 74, 777, 20, 1600, 21, 9516, 9138, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to get the attributes created by the server when creating a model === For creating a new model I need to pass just one attribute: model.save({ name: 'bar' }); Then the server will add extra attributes like the id for this model. Actually the response of the server when I create the new model is > this request has no response data available. What is the best way to get the extra attributes created by the server? Should I fix the sever part? Here's my code: var ListView = Marionette.CompositeView.extend({ // some code events: { 'click #create-user': 'createUser' }, createUser: function (e) { this.collection.create(this.newAttributes(e)); }, newAttributes: function (e) { return { name: $(e.currentTarget).val(), }; } appendHtml: function (collectionView, itemView) { collectionView.$el.find('ul.list-users').append(itemView.el); } });
0
[ 2, 184, 20, 164, 14, 13422, 679, 34, 14, 8128, 76, 2936, 21, 1061, 800, 3726, 3726, 26, 2936, 21, 78, 1061, 31, 376, 20, 1477, 114, 53, 35, 14755, 45, 1061, 9, 19863, 5, 1, 204, 45, 13, 22, 1850, 22, 13, 1, 6, 73, 94, 14, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
jquery datetimepicker options === I'm trying to implement Trent Richardson's `DateTimePicker` jquery plugin, but I'm experiencing some issues because of the lack of documentation. http://trentrichardson.com/2012/07/02/jquery-timepicker-1-0-1-is-available/ 1. How can I disable the automatically populate on invoking `$.datetimepicker` function? http://bit.ly/N87g6k 2. How can I set it to convert the time in a Unix timestamp format, just like the `altFormat: '@'` parameter of jquery ui `datepicker`.
0
[ 2, 487, 8190, 93, 1231, 891, 16855, 106, 6368, 800, 3726, 3726, 31, 22, 79, 749, 20, 8713, 7056, 9204, 22, 18, 13, 1, 8209, 891, 16855, 106, 1, 487, 8190, 93, 10922, 108, 15, 47, 31, 22, 79, 15138, 109, 1549, 185, 16, 14, 1792...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Android gridview keep item selected === I have a GridView with multiple items, but the items must be kept selected once the the onClickListener is called.How can i achive this? I'v already tried `v.setSelected(true)` but it doesnt seem to work.
0
[ 2, 13005, 7354, 4725, 643, 9101, 1704, 800, 3726, 3726, 31, 57, 21, 7354, 4725, 29, 1886, 3755, 15, 47, 14, 3755, 491, 44, 1025, 1704, 382, 14, 14, 27, 150, 10129, 13891, 106, 25, 227, 9, 1544, 92, 31, 21, 1594, 195, 48, 60, 3...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
What is CSS hooks and what are very common css hooks === I have been introduced with the term css hooks but I am not much clear about that. Could you give me some idea. - what is CSS hooks ? - what are the common hooks? - what are the best practices to use css hooks? Any kind of example and relevant links are highly appreciable.
0
[ 2, 98, 25, 272, 18, 18, 5559, 18, 17, 98, 50, 253, 757, 272, 18, 18, 5559, 18, 800, 3726, 3726, 31, 57, 74, 1277, 29, 14, 981, 272, 18, 18, 5559, 18, 47, 31, 589, 52, 212, 1207, 88, 30, 9, 110, 42, 590, 55, 109, 882, 9, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
windows workflow foundation 4.0 new requirment === we Had developed one web application in visual studio 2.0, which consists of many activites, workflows and approvals. now we have new require ment to use Windows Workflow Foundation for all activites and approvals, we had problem how to start and how to implement, i need u r help,that how to invoke workflow file .xaml from my project.
1
[ 2, 1936, 170, 9990, 1304, 268, 9, 387, 78, 302, 3003, 139, 1130, 800, 3726, 3726, 95, 41, 885, 53, 2741, 3010, 19, 3458, 1120, 172, 9, 387, 15, 56, 2043, 16, 151, 13, 19516, 6359, 15, 170, 9990, 18, 17, 4988, 18, 9, 130, 95, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
C++ IDE Eclipse === I am looking for a C++ IDE, typically for debugging purpose. In particular, where I can navigate in source code; say method definition, member declaration etc. I am a Java developer and use Eclipse. I create J2ME project in Eclipse, build it and finally deploy it at same place. At the time of debugging I can easily trace out what I am looking for. For C/C++ support I installed plug-in "Eclipse C/C++ Development Tools". After installing above plug-in, C/C++ code open with font/style/color...but not able to navigate :( Please help me. Thanks, Amit
0
[ 2, 272, 20512, 13, 3448, 11652, 800, 3726, 3726, 31, 589, 699, 26, 21, 272, 20512, 13, 3448, 15, 2442, 26, 121, 16254, 2762, 2131, 9, 19, 1498, 15, 113, 31, 92, 20782, 19, 1267, 1797, 73, 395, 2109, 5465, 15, 322, 7098, 2722, 9,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
IE7 positioned element hides behind parent === I'm struggling to get the CSS right for IE7 and I hope someone here can give me a hand before I throw my pc out the window :p I made a fiddle that shows what I mean: http://jsfiddle.net/ZqkEE/ The div with the word "joepie" hides behind the image in IE7. How do I fix this? Thanks a lot in advance!
0
[ 2, 13, 660, 465, 12125, 4520, 3077, 18, 439, 4766, 800, 3726, 3726, 31, 22, 79, 7587, 20, 164, 14, 272, 18, 18, 193, 26, 13, 660, 465, 17, 31, 1376, 737, 235, 92, 590, 55, 21, 224, 115, 31, 3814, 51, 5168, 70, 14, 1463, 13, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...