unified_texts
stringlengths
32
30.1k
OpenStatus_id
int64
0
4
input_ids
list
token_type_ids
list
attention_mask
list
Fragment gets initialized twice when reloading activity with tabs when orientation changes === I have a problem reloading an activity with tabs and fragments when I change the orientation of my device. Here's the situation: I have an activity which has 3 tabs in the action bar. Each tab loads a different fragment in a FrameLayout in main view. Everything works fine if I don't change the orientation of the device. When I do that Android tries to initialize the current Fragment (calling onCreateView()) twice which produce the following error: E/AndroidRuntime(2022): Caused by: android.view.InflateException: Binary XML file line #39: Error inflating class fragment Here's the sequece of steps that produce the error: 1. I load the activity, select tab nr 2. (everything is fine here) 2. I change the orientation of the device 3. Android destroys the instance of the fragment loaded by tab nr 2 4. Android destroys the activiy 5. Android creates a new instance of the Fragment linked to tab nr 2 and then call onCreate() on this instance. This is fine. 6. Android calls onCreate() on a new activity instance (I'm not sure when it is created, but it doesn't matter anyway). 7. I configure unrelated stuff on the activity and get a referece of the new fragment automatically created by Android. I use FragmentManager.getFragmentByTag() method to do it. 8. I add the first tab to the action bar. When I do that, this tab gets automatically selected. It may represent a problem in the future, but I don't mind about that now. 9. Android calls onTabSelected and a new instance of the first fragment is created (I create the fragments on this method). 10. I replace the current fragment (which is nothing I guess) with the new instance of the first fragment. I use FragmentManager.replace() method. 11. I add all the other tabs without any event being triggered, which is fine. 12. I load my configuration and detect I need to show Tab nr 2 instead Tab nr 1. 13. I call ActionBar.selectTab(myTab) to select Tab nr 2. 14. Android calls onTabUnselected() for the first tab, which removes the first fragment using FragmentManager.remove() method. 15. Android calls onTabSelected on the new tab (Tab nr 2). I use the reference to the fragment created by Android and add it to the layout using FragmentManager.replace() method. 16. Android reaches the end of Activity.onCreate() and calls onCreateView on the fragment instance mentioned above, which is fine. 17. Android Calls onCreate() on the fragment instance ONCE AGAIN. 18. Android calls onCreateView on the fragment instance for the second time, and here everything explodes when I try to inflate the layout. Obviously the problem is Android is initializing the second fragment twice, but I don't know why. I tried NOT selecting the second tab when I reaload the activity but the second fragment gets initialized anyway and it is not shown (since I didn't select its tab). I found this question: http://stackoverflow.com/q/10634854/48468 The users asks basically the same I do, but I don't like the chosen answer (it's only a workaroud). There must be some way to get this working without the android:configChanges trick. In case it's not clear, what I want to know how whether to prevent the recreation of the fragment or to avoid the double initialization of it. It would be nice to know why is this happening also. :P Thank you!
0
[ 2, 14847, 3049, 2104, 1333, 2088, 76, 27339, 68, 2358, 29, 6523, 18, 76, 10245, 1693, 800, 3726, 3726, 31, 57, 21, 1448, 27339, 68, 40, 2358, 29, 6523, 18, 17, 10837, 76, 31, 753, 14, 10245, 16, 51, 3646, 9, 235, 22, 18, 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...
Is there any way to pair Bluetooth device in Windows programmatically === there's a question: Is there any way to pair Bluetooth device in Windows programmatically? (c++, c#) thanks for replies
0
[ 2, 25, 80, 186, 161, 20, 2146, 705, 15808, 3646, 19, 1936, 625, 6732, 1326, 800, 3726, 3726, 80, 22, 18, 21, 1301, 45, 25, 80, 186, 161, 20, 2146, 705, 15808, 3646, 19, 1936, 625, 6732, 1326, 60, 13, 5, 150, 20512, 15, 272, 59...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
Css scaling fluid images === How can I crate a fluid image but with a scale I decide? (lets say 16:9)<br /> I've already made it fluid with max-width: 100%; but how can I choose the width/height proportions? Note: the image has a different scale most of the times.
0
[ 2, 272, 18, 18, 26829, 6250, 3502, 800, 3726, 3726, 184, 92, 31, 19904, 21, 6250, 1961, 47, 29, 21, 3464, 31, 4073, 60, 13, 5, 11045, 395, 347, 45, 518, 6, 1, 5145, 13, 118, 1, 31, 22, 195, 614, 117, 32, 6250, 29, 2049, 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...
Android WebView with URL setting === I am wanting to set the URL of a webview via some sort of settings menu. The purpose of this is to create a web front end to a piece of equipment and the equipment will have it's IP address set. I want to be able to set this IP address as the URL of the app. Any ideas?
0
[ 2, 13005, 2741, 4725, 29, 287, 6362, 2697, 800, 3726, 3726, 31, 589, 4638, 20, 309, 14, 287, 6362, 16, 21, 2741, 4725, 1197, 109, 2058, 16, 12410, 11379, 9, 14, 2131, 16, 48, 25, 20, 1600, 21, 2741, 431, 241, 20, 21, 1855, 16, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 you register a converter to convert between a String and a List of specific types in Spring Web MVC? === Our app accepts a JSON-based string in a controller method that we'd like to convert using Spring's Converter interface into a List of our specific classes. Unfortunately it looks like Spring is picking up this converter (declared as <String, List<Proprietary>>) and using it to convert all Strings into Lists, which is not what is desired. Is there any way around this using the conversion service provided by Spring MVC? We've worked around this by just accepting the string in the controller method and performing the conversion directly, but that's not as clean.
0
[ 2, 184, 92, 42, 2243, 21, 25893, 20, 8406, 128, 21, 3724, 17, 21, 968, 16, 1903, 2551, 19, 1573, 2741, 307, 8990, 60, 800, 3726, 3726, 318, 4865, 16548, 21, 487, 528, 8, 1281, 3724, 19, 21, 9919, 2109, 30, 95, 22, 43, 101, 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...
Excel and vbscript === Iam using .vbs file assigning value of variable from .vbs to excel. while not rs.EOF <> true appid=appid & rs(0) & "," rs.movenext wend appid=4323,3456,1234,4567, appid1=mid(appid,1,len(appid)-1) Appid1=4323,3456,1234,4567 ObjExcel.Cells(RowIter+1, ColIter+1).Value=Appid1 when Appid1 is assigned to excel row.. it converts to values and end it appends number of zeros. Please can somebody help me.
1
[ 2, 20700, 17, 13, 20468, 8741, 800, 3726, 3726, 31, 765, 568, 13, 9, 20468, 18, 3893, 13952, 68, 1923, 16, 7612, 37, 13, 9, 20468, 18, 20, 20700, 9, 133, 52, 13, 1224, 9, 62, 1041, 13, 1, 1151, 4865, 1340, 3726, 7753, 1340, 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...
Kwicks slider images with text === Hello (I am not a programmer so bear with me) I am using drupal 7. My boss loves the KWICKS slider. I have gotten this to work but only with images using views-kwicks module. I would like to be able to have text(teaser) placed over the images in the slider with a link to the corresponding page when clicked, like http://demo.themesmania.com/creative/kwicks-slider How should I go about doing this? Thank you!!
0
[ 2, 680, 3602, 18, 3295, 106, 3502, 29, 1854, 800, 3726, 3726, 10975, 13, 5, 49, 589, 52, 21, 17968, 86, 2746, 29, 55, 6, 31, 589, 568, 15708, 6720, 453, 9, 51, 4054, 9330, 14, 680, 3602, 18, 3295, 106, 9, 31, 57, 4094, 48, 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...
How can I specify the directory for puppet:///private/ when running 'puppet apply'? === So, I have a puppet repository. It's versioned with `git` and things like that. It would be convenient for me to be able to make tentative changes to a copy this repository on my machine, then try out the changes on a test computer, before committing these changes to the puppet server (avoiding the hassles of touching production machines for testing, and the hassle of puppetca signing a temporary EC2 instance). I can `scp` a copy of the repostory over to the appropriate machine and do `puppet apply site.pp --modulepath=foo --templatedir=blah`, and it mostly works... until I have a file that's sourced from `puppet:///private/foo`. Then it's all `Could not evaluate: Could not retrieve information from source(s) puppet:///private/foo at /home/ubuntu/ops-puppet/production/modules/foobar/manifests/baz.pp:68`. Is there a command line flag I can use to make to specify the path to the 'private' files? I can't seem to locate it in the documentation (but I might just be oblivious this morning ;)
0
[ 2, 184, 92, 31, 19077, 14, 16755, 26, 10956, 6903, 118, 20181, 118, 76, 946, 13, 22, 306, 576, 6240, 5645, 22, 60, 800, 3726, 3726, 86, 15, 31, 57, 21, 10956, 24869, 9, 32, 22, 18, 615, 69, 29, 13, 1, 10404, 1, 17, 564, 101,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
iPhone HARDCODING a swipe === Basically, we either have remote access to the iPhone or the phone is connected to a network where we can control the phone (send it messages etc.) How can I simulate a swipe without touching the actual phone? I know there are Swipe Recognizers, but I haven't found a way to HARDCODE coordinates to simulate a swipe; for example, without touching the phone, perform the swipe to unlock.
0
[ 2, 21024, 552, 15458, 21, 27246, 800, 3726, 3726, 11374, 15, 95, 694, 57, 5388, 1381, 20, 14, 21024, 54, 14, 1132, 25, 2587, 20, 21, 982, 113, 95, 92, 569, 14, 1132, 13, 5, 18, 2451, 32, 7561, 2722, 9, 6, 184, 92, 31, 24969, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Get the title from the pages table === How do I use Doctrine in Symfony to get page title from a table of pages, for example $title = Doctrine::getTable('MyTable')->getTitle($this->page_id); ?
0
[ 2, 164, 14, 581, 37, 14, 4434, 859, 800, 3726, 3726, 184, 107, 31, 275, 7521, 19, 13, 7261, 10229, 93, 20, 164, 2478, 581, 37, 21, 859, 16, 4434, 15, 26, 823, 5579, 22235, 800, 7521, 45, 45, 3060, 5924, 5, 22, 915, 5924, 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...
WPF/SL control to represent grapf on the map. Any ideas? === I need to create WPF/SL application to represent a graph on the map. The users will create and edit the graph vertices linked with geographic locations. Please recommend WPF/SL control suitable for this task.
0
[ 2, 619, 7721, 118, 18, 255, 569, 20, 3501, 5120, 7721, 27, 14, 2942, 9, 186, 3478, 60, 800, 3726, 3726, 31, 376, 20, 1600, 619, 7721, 118, 18, 255, 3010, 20, 3501, 21, 7210, 27, 14, 2942, 9, 14, 3878, 129, 1600, 17, 9392, 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...
Post onto multiple facebook pages === I'm new to facebook api, for last two days I'm looking to find a way to post onto multiple facebook pages. I've list of facebook page id's eg: 1234, 34456, 77889,44224432 and so on.... (I dont own those pages) Is there a way I could post same message on all of these pages once?
0
[ 2, 678, 1204, 1886, 9090, 4434, 800, 3726, 3726, 31, 22, 79, 78, 20, 9090, 21, 2159, 15, 26, 236, 81, 509, 31, 22, 79, 699, 20, 477, 21, 161, 20, 678, 1204, 1886, 9090, 4434, 9, 31, 22, 195, 968, 16, 9090, 2478, 4924, 22, 18...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
TreeListNode BackColor Image === together with greeting them I need to know since I can change the back color of the image of a treelistnode, can change the color of the entire row but the backcolor of the image does not change. I attach an image in order that it clarifies the question, the back color that this enclosed in a circle, from already thank you very much. ![Example][1] [1]: http://i.stack.imgur.com/qXrV6.png
0
[ 2, 1541, 5739, 251, 546, 97, 11282, 1961, 800, 3726, 3726, 429, 29, 13769, 105, 31, 376, 20, 143, 179, 31, 92, 753, 14, 97, 1665, 16, 14, 1961, 16, 21, 1541, 5739, 251, 546, 15, 92, 753, 14, 1665, 16, 14, 1078, 3131, 47, 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...
How to Finish a Feature in Flow Extension with a Subrepo === I have a mercurial repository repo1 with a subrepository common1. I'm using the Mercurial Flow extension. While the Flow and subrepo features don't seem mutually exclusive, I could not find documentation on using them in conjunction. Specifically, I'm wondering about the right way to start and finish a feature in Flow with subrepos. I **think** I have to start each feature on the subrepo first and then on the main repo. I've tried it on a test repo successfully. I also **think** I have to finish each feature on the main repo first, because it will commit the subrepo and record its feature branch changeset in .hgsubstate (assuming subrepo commit is on), before committing and merging the main repo. I then have to finish the feature on the subrepo. Is this the right way to do it? Am I missing some important consideration here?
0
[ 2, 184, 20, 2106, 21, 1580, 19, 3312, 3896, 29, 21, 972, 99, 1638, 800, 3726, 3726, 31, 57, 21, 9046, 3594, 192, 24869, 302, 1638, 165, 29, 21, 972, 99, 14882, 14599, 757, 165, 9, 31, 22, 79, 568, 14, 9046, 3594, 192, 3312, 38...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
CSS Bottom Aligment issues with my footer === I'm experiencing some issues with the footer of my website http://goo.gl/Pluy2 I'd like to have the facebook like button, the twitter button and the language selector all aligned at the same level (ie; few px from the bottom of the page). Currently as you can see on the picture all these 3 elements have a different vertical alignment. Could you help me identify and fixing this issue please? Many thanks, Greg ![bottom alignment issue][1] [1]: http://i.stack.imgur.com/Cc5Nd.jpg the html code: <div id="footer"> <div id="social"><div class="fb-like" data-href="http://www.gregsitedfds.com" data-send="false" data-layout="button_count" data-width="106" data-show-faces="false" data-font="verdana"></div><a href="https://twitter.com/share" class="twitter-share-button" data-lang="msa">Tweet</a> <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script> </div> <span class="languageselector"><a href="fr/" title="Version Française">FR</a> | <a href="en/" title="English Version">EN</a> | <a href="index.htm" title="Norway Version">NO</a></span></div> the css code: #footer { position:fixed; bottom:0; color:#333; left:0; z-index:999; width:96%; text-align:right; padding:30px 2%; } #social { position:absolute; vertical-align:middle; left:2%; color:#333; }
0
[ 2, 272, 18, 18, 2129, 21, 12828, 1130, 1549, 29, 51, 1749, 106, 800, 3726, 3726, 31, 22, 79, 15138, 109, 1549, 29, 14, 1749, 106, 16, 51, 2271, 7775, 6903, 16111, 9, 8430, 118, 18527, 93, 135, 31, 22, 43, 101, 20, 57, 14, 9090...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
is read operations expensive on Riak? === Watching the Basho Vimeo talk about Voxer, Matt told that "Read Operations are really expensive". When a read occurs, the Riak use some kind of Quorum to choose which node will provide the data? Riak is masterless, so every node should contain the same data, isn't? (Obviously after the inconsistency window that come from eventual consistency ) Thanks
0
[ 2, 25, 1302, 1311, 5381, 27, 13, 2548, 197, 60, 800, 3726, 3726, 1953, 14, 13158, 111, 1790, 790, 111, 930, 88, 13, 22611, 106, 15, 2315, 470, 30, 13, 7, 10647, 1311, 50, 510, 5381, 7, 9, 76, 21, 1302, 3690, 15, 14, 13, 2548, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Excel.Range Doesn't give the correct output === Im a beginner in C#.net. Im reading an excel with multiple tabs in C#. Excel.Range is the one which im using to get the range of the used cells in the worksheet. I tired both the below methods. Excel.Range Shtrange = new Excel.Range(); Shtrange = worksheet.UsedRange(); and Excel.Range last = sheet.Cells.SpecialCells(Excel.XlCellType.xlCellTypeLastCell, Type.Missing); Excel.Range range = sheet.get_Range("A1", last); Both the methods works as expected with the excel sheet created manually. But when i use an excel sheet downloaded from a tool, it always takes the range(1..70 and 1..200) I tried various methods to correct the excel. but still it give the wrong range. Can anyone please help me out to resolve the issue. Thanks Amrita
0
[ 2, 20700, 9, 8366, 1437, 22, 38, 590, 14, 4456, 5196, 800, 3726, 3726, 797, 21, 26931, 19, 272, 5910, 9, 2328, 9, 797, 1876, 40, 20700, 29, 1886, 6523, 18, 19, 272, 5910, 9, 20700, 9, 8366, 25, 14, 53, 56, 797, 568, 20, 164, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Error throws after gem --version === $ gem --version [/home/rohit/.rvm/gems/ruby-1.9.3-p125@qnrDashboard/specifications/net-ssh-2.5.2.gemspec] isn't a Gem::Specification (NilClass instead). [/home/rohit/.rvm/gems/ruby-1.9.3-p125@qnrDashboard/specifications/net-sftp-2.0.5.gemspec] isn't a Gem::Specification (NilClass instead). [/home/rohit/.rvm/gems/ruby-1.9.3-p125@qnrDashboard/specifications/net-ssh-gateway-1.1.0.gemspec] isn't a Gem::Specification (NilClass instead). [/home/rohit/.rvm/gems/ruby-1.9.3-p125@qnrDashboard/specifications/net-scp-1.0.4.gemspec] isn't a Gem::Specification (NilClass instead). rvm 1.12.3 gem 1.8.22 ruby version 1.9.3 Why I am getting this error? Thanks, Rohit
0
[ 2, 7019, 13566, 75, 8551, 13, 8, 8, 10898, 800, 3726, 3726, 5579, 8551, 13, 8, 8, 10898, 636, 118, 8167, 118, 661, 10242, 118, 9, 10359, 79, 118, 20231, 18, 118, 1820, 779, 8, 165, 9, 518, 9, 240, 8, 306, 16649, 1, 1251, 103, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
UTF-8 issue in Firefox - response header overriding meta tag? === I have a page with the following meta tag: <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> I thought this would set the default character set to UTF-8 and indeed it appears to in Chrome and Safari, but not in Firefox. I have a PHP script on the page which generates a playlist of audio files for jPlayer, and filenames with accents in characters aren't working/playing in Firefox. Here is the error message I am seeing in the Firebug console: ![enter image description here][1] As you can see the characters in the filename aren't getting read correctly. The filename should be "Guessi-Guéré-Guessi (Pop Bariba)" When I then look for more detail on the error, under the "Headers" tab I see this: ![enter image description here][2] Which shows that the charset is iso-8859-1. Then in the "Response" tab I see: ![enter image description here][3] Which confirms the error, but this time with the correct encoding showing. The file definitely exists, and as I say it plays/works in other browsers. So I am presuming the issue is to do with the response headers getting set differently in Firefox, and overriding the meta tag. I have checked the response headers in Chrome, and they are indeed set to UTF-8. What can I do to fix this? [1]: http://i.stack.imgur.com/Qyjzg.png [2]: http://i.stack.imgur.com/apWsE.png [3]: http://i.stack.imgur.com/EmkAF.png
0
[ 2, 287, 11720, 8, 457, 1513, 19, 535, 18219, 13, 8, 1627, 157, 106, 84, 5175, 68, 7618, 3383, 60, 800, 3726, 3726, 31, 57, 21, 2478, 29, 14, 249, 7618, 3383, 45, 13, 1, 5909, 58, 7775, 8, 9629, 710, 3726, 7, 25424, 8, 4474, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 use grep or awk to extract specific block from a file === I have a sample data in a log file > NODE-ID> command1 > > Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam > nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat > volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation > ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. > > > NODE-ID> command2 > > Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam > nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat > volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation > ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. > > NODE-ID> command3 > > Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam > nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat > volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation > ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. I have a file which is generated by sequential commands. I am not sure how can i extract data from the log file suppose if I need to extract data from file > NODE-ID> command1 > > Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam > nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat > volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation > ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. what is the best way to do so ? I have most my script written in shell script, I can use awk or sed. Please suggest
0
[ 2, 184, 20, 275, 5604, 306, 54, 13, 3885, 197, 20, 10962, 1903, 1921, 37, 21, 3893, 800, 3726, 3726, 31, 57, 21, 5717, 1054, 19, 21, 6738, 3893, 13, 1, 15421, 8, 1340, 1, 1202, 165, 13, 1, 13, 1, 12977, 79, 31, 1919, 723, 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...
c# start new process in window mode === My c# application starting console .exe file. process is starting correctly its visible in Task manager but process running without window. How i can run console applications in window ? Code: p_info.UseShellExecute = true; p_info.CreateNoWindow = false; p_info.WindowStyle = ProcessWindowStyle.Normal; Process.Start(p_info);
0
[ 2, 272, 5910, 799, 78, 953, 19, 1463, 3740, 800, 3726, 3726, 51, 272, 5910, 3010, 1422, 8650, 13, 9, 1706, 62, 3893, 9, 953, 25, 1422, 12044, 82, 4560, 19, 3005, 1382, 47, 953, 946, 366, 1463, 9, 184, 31, 92, 485, 8650, 3767, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 include javascript in that is bundled in a gem file? === I'm confused... I have installed a new gem file which packages a bunch of js ([rails-fullcalendar][1]). I now want to use this gem. So I added some <div id='calendar'></div> which I use with some js in my application $('#calendar').fullCalendar(); Problem is, it won't work since I don't have the proper js files. I added js includes in my layout like this: <%= javascript_include_tag "fullcalendar.js" %> But that makes little sense. There is no fullcalendar.js in my assets so the browser complains about missing js files. Where are theses js in the gem file? How do I include js from this gem file? [1]: https://github.com/bokmann/fullcalendar-rails
0
[ 2, 184, 20, 468, 8247, 8741, 19, 30, 25, 10194, 43, 19, 21, 8551, 3893, 60, 800, 3726, 3726, 31, 22, 79, 4230, 9, 9, 9, 31, 57, 4066, 21, 78, 8551, 3893, 56, 16875, 21, 7653, 16, 487, 18, 13, 5, 2558, 7301, 18, 8, 13727, 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...
Regex - Order Multiline SQL String === Given a string e.g.: CREATE TABLE [dbo].[Table1] ( [Id] [int] NOT NULL, [Title] [nvarchar](255) NULL ) ALTER TABLE [dbo].[Table1] ADD CONSTRAINT [PK_Table1] PRIMARY KEY CLUSTERED ([Id]) INSERT INTO [dbo].[Table1] ([Id], [Title]) VALUES ('Home', NULL) CREATE TABLE [dbo].[Table2] ( [Id] [int] NOT NULL, [Title] [nvarchar](255) NULL ) ... How would i go about ordering the statement so that the CREATE TABLE bits are at the top. I'm guessing i would have to use regular expressions but i'm not sure where i go from there. I'd appreciate the help. Thanks
0
[ 2, 7953, 1706, 13, 8, 389, 1889, 1143, 4444, 255, 3724, 800, 3726, 3726, 504, 21, 3724, 13, 62, 9, 263, 9, 45, 1600, 859, 636, 43, 1192, 500, 9, 2558, 5924, 165, 500, 13, 5, 636, 1340, 500, 636, 6391, 500, 52, 16203, 15, 636, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Controlling media player through asp.net web api === My idea is to **control windows media player on my desktop remotely**, and want it to be as simple as just visiting a web page through a browser, for ex: `http://localhost/player/play/track_url` should ideally open windows media player and play it, and for pausing: `http://localhost/player/pause` I came across asp.net web api and built a sample application where in I'm using wmplib.dll for controlling the player. WindowsMediaPlayer _player; string url = "http://66.90.103.189:8910"; //radio station url _player.openPlayer(url); Now, the problem is since it's stateless, I CAN play a file as I said in above example, but, I can't pause or stop or control the already open media player application since I don't have any reference to the player application after it launches (obviously, since media player is not any server which listens to commands). Any leads on how to go about it? Has anyone tried something similar? do i need to create a separate windows forms application which listens to http and also host the media player? any suggestions would be helpful. **tl;dr; I want to control windows media player through http and don't know how to proceed, please help**
0
[ 2, 10106, 941, 517, 120, 28, 306, 9, 2328, 2741, 21, 2159, 800, 3726, 3726, 51, 882, 25, 20, 13, 1409, 12898, 1936, 941, 517, 27, 51, 17404, 23288, 1409, 15, 17, 259, 32, 20, 44, 28, 1935, 28, 114, 4803, 21, 2741, 2478, 120, 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...
EF Migrations migrate.exe generate script === I'm playing around with Entity framework and continuous builds. So far i'm able to run a migration or series of migrations without any problem by using migrate.exe and the appropriate arguments. However, i've hit trouble when trying to get migrate.exe to kick out a script, rather than perform the migration, in the same way as I could get by running update-database -TargetMigration TestMigration -script from within Package Manager Console in Visual Studio. Is there currently a way to do this? Thanks.
0
[ 2, 11599, 8443, 18, 22985, 9, 1706, 62, 7920, 3884, 800, 3726, 3726, 31, 22, 79, 791, 140, 29, 9252, 6596, 17, 6357, 1895, 18, 9, 86, 463, 31, 22, 79, 777, 20, 485, 21, 8443, 54, 231, 16, 8443, 18, 366, 186, 1448, 34, 568, 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...
How to look up information based off a single cell? In Excel === I've been working on VBA for so long I forgot how to do this...using formulas. I have a cell that has a descriptor in it, in this case K1122121. The cell next to it, will be the description. On another sheet I have a list of parts, I need to look up said part number on sheet 2, and place the description next to the part it's looking up. I know it's possible, I just forget how. So to recap. Sheet one has two cells, the first is a part number, the 2nd next to it, is where the formula is going, in this cell will produce the description to said part number. Sheet two has part and description side by side. I need to reference the part number and find the description. Once the description is found, place said description in the description field in sheet one. Thanks for the help.
0
[ 2, 184, 20, 361, 71, 676, 432, 168, 21, 345, 1667, 60, 19, 20700, 800, 3726, 3726, 31, 22, 195, 74, 638, 27, 566, 969, 26, 86, 175, 31, 9564, 184, 20, 107, 48, 9, 9, 9, 12655, 3729, 18, 9, 31, 57, 21, 1667, 30, 63, 21, 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...
Insert trigger preventing duplicates === I have a table with a AutoIdentity column as its PK and a nvarchar column called "IdentificationCode". All I want is when inserting a new row, it will search the table for any preexisting IdentificationCode, and if any found roll back the transaction. I have written the folowing trigger: ALTER trigger [dbo].[Disallow_Duplicate_Ids] on [dbo].[tbl1] for insert as if ((select COUNT(*) from dbo.tbl1 e , inserted i where e.IdentificationNo = i.IdentificationNo ) > 0) begin RAISERROR('Multiple Ids detected',16,1) ROLLBACK TRANSACTION end But when inserting new rows, it always triggers the rollback even if there is no such IdentificationCode. Can any one help me please? thanks
0
[ 2, 14692, 7286, 11520, 19429, 18, 800, 3726, 3726, 31, 57, 21, 859, 29, 21, 3108, 13384, 856, 4698, 28, 82, 13, 17244, 17, 21, 13, 103, 3311, 5433, 4698, 227, 13, 7, 13384, 4634, 9375, 7, 9, 65, 31, 259, 25, 76, 14692, 68, 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 test 118n in Rails with RSpec === **Question context:** let say that there is some really important row in **config/locales/en.yml** that is crucial to exist. en: foo: bar: "bubla!" * I don't want to test every single line but * I don't want the test to be too brittle (so no I18n.t('foo.bar').should =~ /bubla/) so way I'm testing currently is like this #spec/locals_spec.rb require 'spec_helper' describe I18n do it do I18n.t('date.datepicker').should be_kind_of(String) end end this way I'm just ensuring that translation exist and that it don't continues (e.g. 'foo.bar.car.lol' but still I'm not satisfied **Question:** What's the best practice to test I18n translations with RSpec and where in spec folder I should place them ?
0
[ 2, 184, 20, 1289, 13, 11479, 103, 19, 2240, 18, 29, 13, 1224, 12610, 800, 3726, 3726, 13, 1409, 24652, 4141, 45, 1409, 408, 395, 30, 80, 25, 109, 510, 681, 3131, 19, 13, 1409, 14093, 2816, 118, 15580, 160, 118, 219, 9, 93, 8184,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 access datetime field of SharePoint list's attribute inside a javascript function? === How to access datetime field of SharePoint list's attribute inside a javascript function? I have a the datetime field "StartedOn", how can I access the sharepoint datafield inside the javascript? I tried this by like this var ppe = document.getElementById(<xsl:value-of select ="$StartedOn"/>').value; (This is inside the Default.aspx page) But not working, any alternative will be much helpful. Vinu
0
[ 2, 184, 20, 1381, 1231, 891, 575, 16, 1891, 3132, 968, 22, 18, 35, 14755, 572, 21, 8247, 8741, 1990, 60, 800, 3726, 3726, 184, 20, 1381, 1231, 891, 575, 16, 1891, 3132, 968, 22, 18, 35, 14755, 572, 21, 8247, 8741, 1990, 60, 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...
Testing Spring JMS topic CLIENT_ACK === I have a JMS broker activeMQ configured with Spring, I have a subscriber to a topic. Configuration for the Broker is so that acknowlgementMode is set to Client_Ack. I need to create a Unit Test where after placing message on the topic, there is a process that sends acknowledgment to a topic. After that I want to verify that the message is removed from the topic, and I will have another test where client read a message but did not send the ack and I want to verify that the message is not removed from the topic. I dont know how to check the topic for the presence of the messages. Regards. Actually I use Camel but I did not want to complicate anyone. here is a link to original question: http://camel.465427.n5.nabble.com/Testing-a-Route-which-de-queues-message-from-Topic-in-CLIENT-ACKNOWLEDGE-mode-td5715361.html#a5715505
0
[ 2, 4431, 1573, 487, 79, 18, 8303, 6819, 1, 8735, 800, 3726, 3726, 31, 57, 21, 487, 79, 18, 14930, 1348, 79, 1251, 28895, 29, 1573, 15, 31, 57, 21, 13, 20330, 139, 20, 21, 8303, 9, 8091, 26, 14, 14930, 25, 86, 30, 13, 8735, 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 remove 'ok' button from custom upload form === So, i created my own custom tool bar and added a button to upload image from database and not from server. On my upload form i had 'upload' button, 'ok' button and a 'cancel' button. The 'ok' button was kinda useless there, so i thought of getting rid of it. This is what you should do to remove it. Go to config .js and enter the following line in your code. > CKEDITOR.editorConfig = function (config) { // Define changes to default configuration here. For example: // config.language = 'fr'; // config.uiColor = '#AADC6E'; config.toolbar = 'Full'; config.extraPlugins = 'testimage'; config.toolbar_Full = [ { name: 'insert', items: ['testimage', 'Flash', 'Table', 'HorizontalRule', 'Smiley', 'SpecialChar', 'PageBreak', 'Iframe'] }, ]; config.extraPlugins = 'testimage'; CKEDITOR.on('dialogDefinition', function (ev) { // Take the dialog name and its definition from the event data. var dialogName = ev.data.name; var dialogDefinition = ev.data.definition; // if you have any plugin of your own and need to remove ok button if (dialogName == 'testimage') { // remove ok button dialogDefinition.onShow = function () { document.getElementById(this.getButton('ok').domId).style.display = 'none'; }; } }); }; There you go !! No more 'ok' button in your upload form.
1
[ 2, 184, 20, 4681, 13, 22, 3085, 22, 5167, 37, 5816, 71, 8294, 505, 800, 3726, 3726, 86, 15, 31, 679, 51, 258, 5816, 5607, 748, 17, 905, 21, 5167, 20, 71, 8294, 1961, 37, 6018, 17, 52, 37, 8128, 9, 27, 51, 71, 8294, 505, 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...
How can I remove this if condition from my view? === Here's the view: @if (stream.StreamSourceId == 1) { <img class="source" src="@Url.Content("~/Public/assets/images/own3dlogo.png")" alt="" /> } else if (stream.StreamSourceId == 2) { <img class="source" src="@Url.Content("~/Public/assets/images/twitchlogo.png")" alt="" /> } Basically, I use a Model property to determine what image to render. I **know** that the correct solution would be to create a property on the model called `SourceImageUrl (string)` and use that property as the source url for the image. I would then transfer this conditional operation to the model. My question is, how can I do this if I'm using DataAnnotations for validation? Any suggestions? public class StreamModel { // This is the ID that has the value of either 1 or 2. public int StreamSourceId { get; set; } // How can I move the logic from the view, to here, and set the value accordingly? public string SourceImageUrl { get; set; } }
0
[ 2, 184, 92, 31, 4681, 48, 100, 2874, 37, 51, 1418, 60, 800, 3726, 3726, 235, 22, 18, 14, 1418, 45, 13, 1, 821, 13, 5, 11260, 9, 11260, 12097, 1340, 800, 3726, 137, 6, 13, 1, 13, 1, 1660, 263, 718, 3726, 7, 12097, 7, 13, 18...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Threading access to various buffers === I'm trying to figure out the best way to do this, but I'm getting a bit stuck in figuring out exactly what it is that I'm trying to do, so I'm going to explain what it is, what I'm thinking I want to do, and where I'm getting stuck. I am working on a program that has a single array (Image really), which per frame can have a large number of independent operations performed on various parts of the array. Essentially, I'm placing various objects on the image. I'm trying to increase the efficiency of placing the objects on the image, so that I can place more objects. In order to do that, I'm wanting to thread the problem. The first step that I have taken towards threading it involves simply mutex protecting the array. All operations which place an object on the array will call the same function, so I only have to put the mutex lock in one place. So far, it is working, but it is not seeing the improvements that I would hope to have. I am hypothesizing that this is because most of the time, the limiting factor is the image write statement. What I'm thinking I need to do next is to have multiple image buffers that I'm writing to, and to combine them when all of the operations are done. I should say that obscuration is not a problem, all that needs to be done is to simply add the pixel counts together. However, I'm struggling to figure out what mechanism I need to use in order to do this. I have looked at semaphores, but while I can see that they would limit a number of buffers, I can envision a situation in which two or more programs would be trying to write to the same buffer at the same time, potentially leading to inaccuracies. I need a solution that does not involve any new non-standard libraries. I am more than willing to build the solution, but I would very much appreciate a few pointers in the right direction, as I'm currently just wandering around in the dark...
0
[ 2, 9322, 68, 1381, 20, 617, 17497, 18, 800, 3726, 3726, 31, 22, 79, 749, 20, 1465, 70, 14, 246, 161, 20, 107, 48, 15, 47, 31, 22, 79, 1017, 21, 1142, 4549, 19, 25379, 70, 1890, 98, 32, 25, 30, 31, 22, 79, 749, 20, 107, 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...
Mimic HTML5 form validation default styling === I have a simple HTML5 form with required fileds. When the page loads the fields have no styling. When I click on the required field, type something and then erase the text I just typed and exit the field, it shows me pink box-shadow outside the invalid field in Firefox. Now I need yellow box-shadow, while retaining the same behavior. That's how I did: **In HTML** <input name="email_address" id="email_address_uuid_479823574" type="email" placeholder="ex. example@domain.com" title="Email address" required /> ------- ------- <input name="model_number" id="model_number_uuid_479823574" type="text" placeholder="ex. oxpd-983s" title="Equipment model number" required /> **In CSS** input:required:invalid {box-shadow: 1px 2px 9px yellow}; Result: The page loads with all the fields with yellow box-shadow! Rather wait for user to make the mistake onblur and onsubmit like the default behavior. How to override the default box-shadow of invalid field ***without changing the behavior***?
0
[ 2, 13567, 13, 15895, 264, 505, 27999, 12838, 23020, 800, 3726, 3726, 31, 57, 21, 1935, 13, 15895, 264, 505, 29, 1390, 5263, 18, 9, 76, 14, 2478, 19069, 14, 2861, 57, 90, 23020, 9, 76, 31, 10840, 27, 14, 1390, 575, 15, 1001, 301,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Will it be practical to implement deb preinst, postint, etc. scripts in Python, not in sh === I'm interested in what pitfalls can be (except Python is not installed in target system) when using Python for deb package flow control scripts (preinst, postinst, etc.). Will it be practical to implement those scripts in Python, not in sh? As I understand it's at least possible.
0
[ 2, 129, 32, 44, 5713, 20, 8713, 12406, 782, 108, 384, 15, 678, 6391, 15, 2722, 9, 17505, 19, 20059, 15, 52, 19, 5527, 800, 3726, 3726, 31, 22, 79, 3158, 19, 98, 4175, 5660, 18, 92, 44, 13, 5, 10066, 20059, 25, 52, 4066, 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...
Java application that print its own source code === i have little quiz that i cant solve it by myself. I want to build the app that will print its own source code with java. Anyone knows how to? the case like this public class SourcePrint { private static final long serialVersionUID = 1L; public void test(){ System.out.println("Hi I'm test"); } public static void main(String[] args) { new SourcePrint().test(); } } and when we run output would be same like this public class SourcePrint { private static final long serialVersionUID = 1L; public void test(){ System.out.println("Hi I'm test"); } public static void main(String[] args) { new SourcePrint().test(); } } i dont know how to do this. anybody know the solution or at least the hint? this is not the decompiler, the quiz maker told me the hint is "STATIC"
0
[ 2, 8247, 3010, 30, 4793, 82, 258, 1267, 1797, 800, 3726, 3726, 31, 57, 265, 17667, 30, 31, 2973, 8402, 32, 34, 992, 9, 31, 259, 20, 1895, 14, 4865, 30, 129, 4793, 82, 258, 1267, 1797, 29, 8247, 9, 1276, 3620, 184, 20, 60, 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...
how to use Google Maps offline with mapping the location from mysql database? === I want to ask you all something. So, I made an application using Google Maps v3 and map the location from the mysql database. the map which i use is world map. not in a certain location because my database are the IP address location from all over the world. but can I still use and plot the location from mysql database to the Google Maps v3 in offline? What do I need to do? Thank You.
0
[ 2, 184, 20, 275, 8144, 6867, 168, 1143, 29, 13305, 14, 1474, 37, 51, 18, 22402, 6018, 60, 800, 3726, 3726, 31, 259, 20, 1349, 42, 65, 301, 9, 86, 15, 31, 117, 40, 3010, 568, 8144, 6867, 566, 240, 17, 2942, 14, 1474, 37, 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...
How to resolve a hostname to an IP address in Metro/WinRT? === I'm in the process of porting a WP7 app to Windows 8 Metro and one of the (many) conversion obstacles I've encountered is discovering an IP address based on a hostname or DNS name. The following is an example of what I was previously using in WP7: DnsEndPoint dnsEnd = new DnsEndPoint("www.google.com", 80, AddressFamily.InterNetwork); DeviceNetworkInformation.ResolveHostNameAsync(dnsEnd, IPLookupCallbackMethod, this); I've searched online for a solution and browsed the Metro API, but I haven't found anything yet. Has anyone else encountered this problem with Metro/WinRT and found a solution?
0
[ 2, 184, 20, 9854, 21, 2015, 7259, 20, 40, 15735, 3218, 19, 3986, 118, 4181, 5256, 60, 800, 3726, 3726, 31, 22, 79, 19, 14, 953, 16, 1295, 68, 21, 13, 13790, 465, 4865, 20, 1936, 469, 3986, 17, 53, 16, 14, 13, 5, 14842, 6, 62...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Import Jar file into eclipse fails - cannot be resolved to a type === I imported some JARs successfully into my eclipse java project. I get "cannot be resolved to a type" error when I try to use the classes in those JAR files in my code. Now I have to either use eclipse's auto help feature or type the import statements manually to kill the errors and use those classes. How do i stop getting the errors and remove the need to import manually all the time. Eclipse never asks me to import Java.Lang.String. So, how do i ensure that it does the same thing for any other class ?
0
[ 2, 9010, 5112, 3893, 77, 11652, 13614, 13, 8, 1967, 44, 11052, 20, 21, 1001, 800, 3726, 3726, 31, 11808, 109, 5112, 18, 3673, 77, 51, 11652, 8247, 669, 9, 31, 164, 13, 7, 1245, 1270, 44, 11052, 20, 21, 1001, 7, 7019, 76, 31, 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...
Unstructured multi-source data watch === Trying to gain some insight... Here is what I am trying to solve: One of the users visit about a dozen different agenda websites daily and downloads their meeting agenda and notes (PDFs/DOCs/HTMLs). All the websites are completely independent from each other - some with RSS, some without, some with CMS, some static links.. pretty much no consistency among them. Here is what I would like to provide: One website (preferably internal where all the agenda information can be downloaded based on event/schedule) with a list of all the websites and their most recent meeting information. Are there any tools.. to "watch" for recent updates given different conditions per web page? to scan for keyterms and wget the desired data file? THANKSS!
0
[ 2, 367, 13971, 43, 1889, 8, 12097, 1054, 1455, 800, 3726, 3726, 749, 20, 3288, 109, 9239, 9, 9, 9, 235, 25, 98, 31, 589, 749, 20, 8402, 45, 53, 16, 14, 3878, 2139, 88, 21, 5550, 421, 11277, 13931, 1954, 17, 7121, 18, 66, 1235,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
ADO DataSet use EOF or IsEmpty? === The majority of my code for accessing a Stored Procedure dataset (MS SQL Server, forward-only, readonly) is a fallback to my Clipper coding from many years ago MyStoredProc.Open; while not MyStoredProc.Eof do begin DoSomething; MyStoredProc.Next; end; In code review today, I noticed a reference to IsEmpty instead in a similar block of code. Is this just a preference or is there any real difference in the example scenario?
0
[ 2, 21, 537, 1054, 3554, 275, 13, 62, 1041, 54, 25, 26542, 60, 800, 3726, 3726, 14, 1698, 16, 51, 1797, 26, 1381, 68, 21, 8214, 7004, 1054, 3554, 13, 5, 79, 18, 4444, 255, 8128, 15, 917, 8, 4965, 15, 1302, 4965, 6, 25, 21, 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...
Comments form above comments === How can i have a comments form above the comments themselves. Works @post = Post.find(params[:id]) @post.comments.each do |comment| comment.id end @post.comments.build # form here end Desired but fails @post = Post.find(params[:id]) @post.comments.build # form here end @post.comments.each do |comment| comment.id end
0
[ 2, 7534, 505, 784, 7534, 800, 3726, 3726, 184, 92, 31, 57, 21, 7534, 505, 784, 14, 7534, 1366, 9, 693, 13, 1, 6962, 800, 678, 9, 19811, 5, 6351, 79, 18, 2558, 45, 1340, 500, 6, 13, 1, 6962, 9, 960, 6601, 9, 14322, 107, 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...
Imageflow 1.3.0 --> How to change front image by "onomuseclick" on text or div === I tried the glideTo function from some other website example but it does not work on imageflow 1.3.0
0
[ 2, 1961, 9990, 137, 9, 240, 9, 387, 13, 8, 8, 1, 184, 20, 753, 431, 1961, 34, 13, 7, 9835, 25443, 150, 10129, 7, 27, 1854, 54, 13, 12916, 800, 3726, 3726, 31, 794, 14, 15501, 262, 1990, 37, 109, 89, 2271, 823, 47, 32, 630, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0...
Mysql server has gone away - MySQL error 2006: === When trying to edit table data in one of databases, I can't apply the change because of the error `"MySQL error 2006: mysql server has gone away"` This problem is intermittent ... so I did some research on this and I came across this [post][1] ... (note: I'm not at all knowledgeable on databases and php) ... Now I see mysql_ping Pings a server connection or reconnects it if there is no connection. Sounds great... my issue is how do I apply this mysql_ping? Where do I go and do it? Is it ok to apply it or will it effect certain things? My server runs off Windows 2003, IIS and I have PHP 5.3.8. I've had a look [here][2] but I'm battling to understand it - Remember I'm a layman. Thanks in advance [1]: http://stackoverflow.com/questions/7942154/mysql-error-2006-mysql-server-has-gone-away [2]: http://ie2.php.net/mysql-ping
0
[ 2, 51, 18, 22402, 8128, 63, 1042, 229, 13, 8, 51, 18, 22402, 7019, 17037, 800, 3726, 3726, 76, 749, 20, 9392, 859, 1054, 19, 53, 16, 6018, 18, 15, 31, 92, 22, 38, 5645, 14, 753, 185, 16, 14, 7019, 13, 1, 7, 915, 18, 22402, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Yii Fixtures --- Exception: Unknown property 'projects' for class 'ProjectTest' === I'm following the "Agile web application development with yii 1.1 and php5" book and i'm at the testing with fixtures section. I followed their code but i can't access to the fixture... I'm running my tests with phpunit and it returns me this c:\wamp\www\agileBook\protected\tests>phpunit unit/ProjectTest.php PHPUnit 3.6.11 by Sebastian Bergmann. Configuration read from C:\wamp\www\agileBook\protected\tests\phpunit.xml ←[31;1mE←[0m Time: 0 seconds, Memory: 5.75Mb There was 1 error: 1) ProjectTest::testRead Exception: Unknown property 'projects' for class 'ProjectTest'. C:\wamp\yii\framework\test\CDbTestCase.php:63 C:\wamp\www\agileBook\protected\tests\unit\ProjectTest.php:11 C:\wamp\bin\php\php5.3.13\phpunit:46 ←[37;41m←[2KFAILURES! ←[0m←[37;41m←[2KTests: 1, Assertions: 0, Errors: 1. ←[0m←[2K How can i make it work? **Thank you for your help** **my fixture:** C:\wamp\www\agileBook\protected\tests\fixtures\tbl_project.php <?php return array( 'project1' => array( 'name' => 'Test Project 1', 'description' =>'This is test project 1', 'create_time' =>'', 'create_user_id' =>'', 'update_time' =>'', 'update_user_id' =>'', ), 'project2' => array( 'name' => 'Test Project 2', 'description' =>'This is test project 2', 'create_time' =>'', 'create_user_id' =>'', 'update_time' =>'', 'update_user_id' =>'', ), ), ?> **my Project test class:** C:\wamp\www\agileBook\protected\tests\unit\ProjectTest.php I changed $this->projects('project1') (from the book) for $this->projects['project1'], cause i see in a forum post that projects is an array and not a method. <?php class ProjectTest extends CDbTestCase{ public $fixture = array('projects'=>'Project'); public function testRead(){ // READ the new project $receivedProject = $this->projects['project1']; $this->assertTrue($receivedProject instanceof Project); $this->assertEquals($receivedProject->name,'Test Project 1'); } } ?> **my test config:** C:\wamp\www\agileBook\protected\config\test.php <?php return CMap::mergeArray( require(dirname(__FILE__).'/main.php'), array( 'components'=>array( 'fixture'=>array( 'class'=>'system.test.CDbFixtureManager', ), 'db'=>array( 'connectionString' => 'mysql:host=localhost;dbname=trackstar_test', 'emulatePrepare' => true, 'username' => 'root', 'password' => '', 'charset' => 'utf8', ), ), ) );
0
[ 2, 7679, 49, 19914, 13, 8, 8, 8, 5391, 45, 2562, 1354, 13, 22, 21011, 18, 22, 26, 718, 13, 22, 21011, 10543, 22, 800, 3726, 3726, 31, 22, 79, 249, 14, 13, 7, 14482, 413, 2741, 3010, 522, 29, 7679, 49, 137, 9, 165, 17, 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...
How to use static with typedef? === Since `typedef` is a storage class in C , it cannot be used with `static` variables . For example , `typedef static int SI` , `SI a` would not work . So is there any other way of using static with typedef ? I already know that this can be done `#define static int SI` . [Storage Classes in C][1] [1]: http://itee.uq.edu.au/~comp2303/Leslie_C_ref/C/CONCEPT/storage_class.html
0
[ 2, 184, 20, 275, 12038, 29, 1001, 13862, 60, 800, 3726, 3726, 179, 13, 1, 4474, 13862, 1, 25, 21, 4326, 718, 19, 272, 13, 15, 32, 1967, 44, 147, 29, 13, 1, 18077, 1, 12157, 13, 9, 26, 823, 13, 15, 13, 1, 4474, 13862, 12038, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 add text widget to a widget in the sidebar, programmatically, in Wordpress === I have a widget I'm accessing here: $all_widgets = wp_get_sidebars_widgets(); $widget = $all_widgets['home-left']; Now how do I add a text widget with text, inside of the $widget widget, programatically?
0
[ 2, 184, 20, 3547, 1854, 4807, 43, 3060, 20, 21, 4807, 43, 3060, 19, 14, 270, 1850, 15, 625, 6732, 1326, 15, 19, 833, 5890, 800, 3726, 3726, 31, 57, 21, 4807, 43, 3060, 31, 22, 79, 1381, 68, 235, 45, 5579, 1233, 1, 3976, 43, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Reading Explorer.exe's Thunk Data === I'm trying to do a little IAT hooking in explorer.exe. Specs: Windows 7 x64, Visual C++. I've made it to a point where I am capable of reading thunk data from any executable of my choosing except for C:\Windows\Explorer.exe. When I run my program against that I receive an access violation in reading memory from that executable. However, when I run this against C:\Windows\system32\Explorer.exe and C:\Windows\sysWOW64\Explorer.exe I don't have any problems. Why is this? Is C:\Windows\Explorer.exe some sort of symbolic link to one of the other explorer.exe's? What could be keeping me from reading this file?
0
[ 2, 1876, 8520, 9, 1706, 62, 22, 18, 13, 96, 17081, 1054, 800, 3726, 3726, 31, 22, 79, 749, 20, 107, 21, 265, 31, 721, 5559, 68, 19, 8520, 9, 1706, 62, 9, 12737, 18, 45, 1936, 453, 993, 3470, 15, 3458, 272, 20512, 9, 31, 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...
Adobe Flex 4.6 Callout and SQLite === does anyone have an example of how to code a Adobe Flex 4.6 Callout where the values come from a SQLite table? I am not having any luck finding a working sample
4
[ 2, 20299, 14409, 268, 9, 379, 645, 1320, 17, 4444, 10601, 800, 3726, 3726, 630, 1276, 57, 40, 823, 16, 184, 20, 1797, 21, 20299, 14409, 268, 9, 379, 645, 1320, 113, 14, 4070, 340, 37, 21, 4444, 10601, 859, 60, 31, 589, 52, 452, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
Convert date to string in Sencha 2 === I want to convert a date to a string, and sees that Sencha 2 has this class for the job. It has a lot of convertion, but I cant find anyone where I can customize how I want the string formatted. I want a date in 'dd-MM-yyyy'. In java you have the SimpleDateFormat class where you give the pattern you want it formated in as parameter, I would except there was something like this in the Date class. If not, whats the best way to do this in pure javascript (no third part libraries), I know the trivial way (getFullYear(), getMonth() and such), but its error prone. http://docs.sencha.com/touch/2-0/#!/api/Date-method-toDateString
0
[ 2, 8406, 1231, 20, 3724, 19, 8252, 1651, 172, 800, 3726, 3726, 31, 259, 20, 8406, 21, 1231, 20, 21, 3724, 15, 17, 6895, 30, 8252, 1651, 172, 63, 48, 718, 26, 14, 1205, 9, 32, 63, 21, 865, 16, 8406, 872, 15, 47, 31, 2973, 477...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Liquid HTML layout not working! I'm stupid === Why is the red box not the same size as the green box? What am I doing wrong? <div style="position:relative; float:left; width:300px; background:red; border:10px solid red"> <div id="holder" style="position:relative;"> <div style="position:absolute; left:0px; top:0px; background:green"><img src="" width=100 height=100></div> </div> </div>
0
[ 2, 4189, 13, 15895, 9106, 52, 638, 187, 31, 22, 79, 3553, 800, 3726, 3726, 483, 25, 14, 402, 1649, 52, 14, 205, 1072, 28, 14, 647, 1649, 60, 98, 589, 31, 845, 1389, 60, 13, 1, 12916, 1034, 3726, 7, 9339, 45, 7256, 3366, 73, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
objective c large random method, am i doing this right? === I've been building a simpler game with core graphics with random scripted encounters if that makes any sense and its started to become a huge method in the view controller. -(void)spawnStuff{ CGPoint position; CGPoint position1; int chance = random()%10; switch (chance) { case 0: [self spawnWall]; Position.y = 580; Position.x = 160; wall.center = Position; [self spawnWall]; Position1.y = 480; Position1.x = 80; wall.center = Position1; } -(void)spawnWall{ UIImage* myImage = [UIImage imageNamed:@"Wall.png"]; Wall = [[Sprite alloc] initWithImage:myImage]; CGRect rect = CGRectMake(0, 0, 90, 50); more initilization stuff } and I might repeat this line of code 20 - 30 different with positions of these walls and with only 10 different scenario its about a 3rd of the code in the class, its starting to get a lil redonkulous I'm still very new to programming and giant methods kinda scare me. Is this the right way to approach this?
0
[ 2, 7038, 272, 370, 5477, 2109, 15, 589, 31, 845, 48, 193, 60, 800, 3726, 3726, 31, 22, 195, 74, 353, 21, 19120, 250, 29, 2884, 8351, 29, 5477, 3884, 69, 12550, 100, 30, 1364, 186, 1259, 17, 82, 373, 20, 533, 21, 2329, 2109, 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...
“specified child already has a parent” error === Sorry to make another topic on this subjcet but I've already read several of them and still don't know why I'm getting this error. I followed the "Building Your First App" tutorial on <http://developer.android.com/training/basics/firstapp/index.html> and then tried to modify my application to give a layout to DisplayMessageActivity Class. I've created a file called "activity_displaymessage.xml" and implemented it to the class. I'm new to android and I'm trying to understand how this all works. What am I doing wrong? Here is my code: MainActivity.java public class MainActivity extends Activity { public final static String EXTRA_MESSAGE = "com.example.sampleandroid.MESSAGE"; . . . public void sendMessage(View view){ Intent intent = new Intent(this, DisplayMessageActivity.class); EditText editText = (EditText) findViewById(R.id.edit_message); String message = editText.getText().toString(); intent.putExtra(EXTRA_MESSAGE, message); startActivity(intent); } } DisplayMessageActivity.java public class DisplayMessageActivity extends Activity { @Override public void onCreate(Bundle savedInstanceState){ super.onCreate(savedInstanceState); setContentView(R.layout.activity_displaymessage); Intent intent = getIntent(); String message = intent.getStringExtra(MainActivity.EXTRA_MESSAGE); TextView textview = (TextView) findViewById(R.id.text_view); textview.setText(message); setContentView(textview); } } activity_displaymessage.xml: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="horizontal" android:weightSum="2"> <TextView android:id="@+id/text_view" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:textSize="30sp"/> </LinearLayout>
0
[ 2, 13, 1, 18, 12610, 4462, 850, 614, 63, 21, 4766, 1, 7019, 800, 3726, 3726, 1875, 20, 233, 226, 8303, 27, 48, 972, 728, 10312, 47, 31, 22, 195, 614, 1302, 238, 16, 105, 17, 174, 221, 22, 38, 143, 483, 31, 22, 79, 1017, 48, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 create image and add background image to it === I would like to add an image as the background image to the image that is created by my PHP code <?php header('Content-type: image/gif'); // Fetch GET params $mode = isset($_GET["mode"]) ? strip_tags($_GET["mode"]) : "big"; $url = isset($_GET["text"]) ? $_GET["text"] : "This is an Invalid QikOut Code"; // Get size depending on mode $size = ($mode && $mode == "small") ? "36" : "200"; // Get chart data. Limit data length if mode is small $chl = ($mode && $mode == "small") ? substr($url, 0, 33) : $url; // Assemble chart image URL $imgUrl = "http://chart.apis.google.com/chart?chs=" . $size . "x" . $size . "&cht=qr&chld=H|0&chl=" . $chl; // Load, transform and write transparent QR code image $im = imagecreatefrompng($imgUrl); imagetruecolortopalette($im, false, 2); $white = imagecolorclosest($im, 0, 0, 0); imagecolortransparent($im, $white); imagegif($im); imagedestroy($im); ?> The image is located on the same server http://www.example.com/img/sitebg.png
0
[ 2, 13, 26120, 1600, 1961, 17, 3547, 2395, 1961, 20, 32, 800, 3726, 3726, 31, 83, 101, 20, 3547, 40, 1961, 28, 14, 2395, 1961, 20, 14, 1961, 30, 25, 679, 34, 51, 13, 26120, 1797, 13, 1, 60, 26120, 157, 106, 5, 22, 25424, 8, 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...
jQuery each field inside parent === I'm trying to build a common clear fields button that has the following html structure: <td colspan="2"> <input type="text" name="unpublish_date" id="unpublish_date" class="calendar" /> <img class="clear_date" src="ico_delete.gif" title="Reset date field"></span> <input type="hidden" name="_unpublish_date" id="_unpublish_date" /> </td> So I though that the right way to do the function is by working with the inputs, inside the parent of `.clear_date` What I would like to know is how to select each input after `$(this).parent` $('.clear_date').click(function(){ $(this).parent().each() ... ? });
0
[ 2, 487, 8190, 93, 206, 575, 572, 4766, 800, 3726, 3726, 31, 22, 79, 749, 20, 1895, 21, 757, 1207, 2861, 5167, 30, 63, 14, 249, 13, 15895, 1411, 45, 13, 1, 38, 43, 3313, 18, 3206, 3726, 7, 135, 7, 1, 13, 1, 108, 4881, 1001, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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't Play shoutcast stream on ios === I have a radio project on ios that's supposed to play mp3 stream, shoutcast stream and eventually mms stream.I've been able to play mp3 stream using matt gallagher's Audistreamer class but it can't play those shoutcast links like this one (http://68.168.117.130:8000) even macos can't play them without using an extra software.So, is there any class that can play such type of links? or i have to create one by my self. Gracias.
0
[ 2, 92, 22, 38, 418, 11905, 6146, 3766, 27, 13, 7760, 800, 3726, 3726, 31, 57, 21, 603, 669, 27, 13, 7760, 30, 22, 18, 2293, 20, 418, 4628, 240, 3766, 15, 11905, 6146, 3766, 17, 878, 1620, 18, 3766, 9, 49, 22, 195, 74, 777, 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...
Code gets stuck at wakelock,while registering to GCM? === It does not get registration id from GCM server the app does not give any error,this is my logcat. 07-13 16:43:39.920: I/** pushAndroidActivity **(5310): inside oncreate() 07-13 16:43:39.920: I/** pushAndroidActivity **(5310): started registration 07-13 16:43:39.920: D/GCMRegistrar(5310): resetting backoff for com.example.registration_id 07-13 16:43:39.920: V/GCMRegistrar(5310): Registering app com.example.registration_id of senders 803641917196 07-13 16:43:42.735: V/GCMBroadcastReceiver(5310): onReceive: com.google.android.c2dm.intent.REGISTRATION 07-13 16:43:42.735: V/GCMBroadcastReceiver(5310): GCM IntentService class: com.example.registration_id.GCMIntentService 07-13 16:43:42.735: V/GCMBaseIntentService(5310): Acquiring wakelock This is the main Activity .i have used the existing gcm.jar file to use GCMRegistrar class methods. package com.example.registration_id; import android.os.Bundle; import android.util.Log; import android.widget.EditText; import android.app.Activity; import com.google.android.gcm.GCMRegistrar; public class MainActivity extends Activity { private String TAG = "** pushAndroidActivity **"; EditText edittext; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); Log.i(TAG, "inside oncreate() "); //check if registered,if not get registration id from GCM server if(GCMRegistrar.getRegistrationId(this).equals("")) { Log.i(TAG, "started registration "); GCMRegistrar.register(this, "803641917206"); } else { final String regId = GCMRegistrar.getRegistrationId(this); Log.i(TAG, "registration id ===== "+regId); edittext=(EditText)findViewById(R.id.msg); edittext.setText(regId); } } } This is the service class- package com.example.registration_id; import android.content.Context; import android.content.Intent; import android.util.Log; import com.google.android.gcm.GCMBaseIntentService; public class GCMIntentService extends GCMBaseIntentService { private static final String TAG = "===GCMIntentService==="; //default constructor protected GCMIntentService(String senderId) { super(senderId); // TODO Auto-generated constructor stub } @Override protected void onError(Context arg0, String arg1) { // TODO Auto-generated method stub Log.i(TAG, "error "); } @Override protected void onMessage(Context arg0, Intent arg1) { // TODO Auto-generated method stub } @Override protected void onRegistered(Context arg0, String registrationId) { // TODO Auto-generated method stub Log.i(TAG, "Device registered: regId = " + registrationId); } @Override protected void onUnregistered(Context arg0, String arg1) { // TODO Auto-generated method stub } }
0
[ 2, 1797, 3049, 4549, 35, 3290, 3966, 15, 10144, 2243, 68, 20, 489, 9095, 60, 800, 3726, 3726, 32, 630, 52, 164, 8587, 4924, 37, 489, 9095, 8128, 14, 4865, 630, 52, 590, 186, 7019, 15, 1565, 25, 51, 6738, 5782, 9, 13, 2984, 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...
How to implement different data entry modes using jQuery with ASP.net === I am researching about the right approach on how to implement data entry forms that change according to the data entry mode. Here's the situation: 1. Consider a parent-child form where you have a list of employees and a section to display employee details. 2. Clicking on an employee number from the list will cause the employee details to appear on the right-hand side of the screen using an HTML table. 3. The employee details will first appear as a read-only form. For example, the Country of Birth field would be displayed as 'SPAN' rather than a SELECT element. 4. When the user clicks the Edit button than the Country of Birth field is changed to a SELECT element containing a list of countries to choose from. It is the behaviour of the ASP.NET FormView with ItemTemplate, EditItemTemplate and InsertItemTemplate that I would like to implement using jQuery. In essence the data entry mode would be toggled by clicking buttons. I thought I would approach this requirement by using CSS rules for fields which would contain different DOM elements according to the data entry mode. As I mentioned earlier, if the mode is read-only show a SPAN otherwise show a dropdown element or textarea. Using jQuery I could toggle() between the different classes according to the data entry mode. Of course this would require two different types of elements for the same field. Is this the best approach? I'm keen to hear from the experts. Thank you.
0
[ 2, 184, 20, 8713, 421, 1054, 2792, 12770, 568, 487, 8190, 93, 29, 28, 306, 9, 2328, 800, 3726, 3726, 31, 589, 527, 68, 88, 14, 193, 2141, 27, 184, 20, 8713, 1054, 2792, 1997, 30, 753, 496, 20, 14, 1054, 2792, 3740, 9, 235, 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...
Perl: passing regex search and replace using variables === I have a Perl script that reads regex search and replace values from an INI file. This works fine until I try to use capture variables ($1 or \1). These get replaced literally with $1 or \1. Any ideas how I can get this capture functionality to work passing regex bits via variables? Example code (not using an ini file)... $test = "word1 word2 servername summary message"; $search = q((\S+)\s+(summary message!:)); $replace = q(GENERIC $4); $test =~ s/$search/$replace/; print $test; This results in ... word1 word2 GENERIC $4 NOT word1 word2 GENERIC summary message thanks
0
[ 2, 416, 255, 45, 2848, 7953, 1706, 2122, 17, 3934, 568, 12157, 800, 3726, 3726, 31, 57, 21, 416, 255, 3884, 30, 11137, 7953, 1706, 2122, 17, 3934, 4070, 37, 40, 19, 49, 3893, 9, 48, 693, 1123, 163, 31, 1131, 20, 275, 3683, 12157...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Scaled colormap of facecolors with mplot3d === I have a simple task that should have a simple solution, but I have been trying for days now. I try to be specific. * I try to plot a surface using matplotlib's mplot3d and plot_surface. When I plot the surface of a dataset 'z' and try to scale the colormap to a certain maximum value I change the 'vmax' property to this value. That works great. * When I try to plot a surface of one dataset (z) and use the facecolors of a second dataset (fc), this also works fine. * When I want to scale the colormap of the facecolors, the vmax property is overruled by the facecolors values. Vmax therefore has no effect (attempt1). The lines also disappeared, but that's another issue. * Also trying to change the values of the facecolor dataset (fc) did not have the desired effect (attempt2). I try to get a figure with a scaled colormap (as in the figure 'scaled' below) but scaled to the facecolors, and not the z-values. Any thoughts are appreciated! The code below is what I have now, and the results look like this: https://dl.dropbox.com/u/1214203/vmax.png (can't post images because I don't have rep points) import pylab as plt import numpy as np from mpl_toolkits.mplot3d import Axes3D plt.ion() # creating dataset profile = np.arange(20)**2 z = profile.repeat(20).reshape(20,20) fc= np.rot90(z.copy()) x = np.arange(z.shape[0]) y = np.arange(z.shape[1]) X, Y = np.meshgrid(x,y) # plotting vmax = 100 fig = plt.figure() ax = fig.add_subplot(1,4,1, projection='3d', azim=210) ax.plot_surface(X,Y,z, cmap=plt.cm.jet, cstride=1, rstride=1) ax.set_title('normal') ax = fig.add_subplot(1,4,2, projection='3d', azim=210) ax.plot_surface(X,Y,z, cmap=plt.cm.jet, cstride=1, rstride=1, vmax=vmax) ax.set_title('scaled') ax = fig.add_subplot(1,4,3, projection='3d', azim=210) ax.plot_surface(X,Y,z, facecolors=plt.cm.jet(fc), cstride=1, rstride=1, vmax=vmax) ax.set_title('rotated (attempt1)') ax = fig.add_subplot(1,4,4, projection='3d', azim=210) fc[fc> vmax] = vmax ax.plot_surface(X,Y,z, facecolors=plt.cm.jet(fc), cstride=1, rstride=1) ax.set_title('rotated (attempt2)')
0
[ 2, 22960, 1665, 15022, 16, 276, 11282, 18, 29, 4628, 5639, 240, 43, 800, 3726, 3726, 31, 57, 21, 1935, 3005, 30, 378, 57, 21, 1935, 4295, 15, 47, 31, 57, 74, 749, 26, 509, 130, 9, 31, 1131, 20, 44, 1903, 9, 1637, 31, 1131, 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...
Wishing to clear my CCIP exams === I am wishing to clear my Cisco CCIP exams in my first attemp but i still not find helpful study material or braindumps of this exam
2
[ 2, 11227, 20, 1207, 51, 272, 11526, 15954, 800, 3726, 3726, 31, 589, 11227, 20, 1207, 51, 28184, 272, 11526, 15954, 19, 51, 64, 35, 9577, 47, 31, 174, 52, 477, 15600, 949, 1492, 54, 1964, 43, 11134, 18, 16, 48, 11796, 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...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 0...
Objective C - Array With Numbers === just asking if there is a nicer way to fill an array with numbers than that what I use. Crazy how much I got to write just to fill an array with numbers so they can be used for a calculation in a loop. In compare to other C based languages like PHP, As3, or Java... this is sick. NSArray *myArray = [NSArray arrayWithObjects: [NSNumber numberWithInt:1000], [NSNumber numberWithInt:237], [NSNumber numberWithInt:2673], nil]; int total = 0; for(int i = 0; i < [myArray count]; i += 1 ){ total += [[myArray objectAtIndex: i]intValue]; NSLog(@"%i", total); } Hopefully there is a shorter way... I just want to fill an array with ints... cant be that hard Thanks Guys
0
[ 2, 7038, 272, 13, 8, 7718, 29, 2116, 800, 3726, 3726, 114, 3379, 100, 80, 25, 21, 2210, 139, 161, 20, 3509, 40, 7718, 29, 2116, 119, 30, 98, 31, 275, 9, 3328, 184, 212, 31, 330, 20, 2757, 114, 20, 3509, 40, 7718, 29, 2116, 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...
multi level vanity urls === I currently have this set up and working fine inside a users folder. RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?i=$1 e.g users/admin goes to index.php?i=admin. Now as this is for a profile page, how would i do something such as this. users/admin/activity So that it would show the activity page for that user? I am totally confused on how i would go about this. Would it be best to make the index.php accept a page $_GET variable? But the how would i get htaccess to work around it?
0
[ 2, 1889, 662, 21498, 13, 911, 7532, 800, 3726, 3726, 31, 871, 57, 48, 309, 71, 17, 638, 1123, 572, 21, 3878, 19294, 9, 27891, 16847, 27, 27891, 1126, 43, 13, 11881, 1, 99, 10351, 1, 16877, 7259, 1, 13, 187, 8, 410, 27891, 1126, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
bjam acting weird? === I thought the output of this code would be Hello World 1 Hello World 2 3 But I get Hello World 1 Hello World 2 Hello World 3 Here's the jam code rule weird ( a : b + : c * : d ? ) { echo "Hello World $(a)" ; echo "Hello World $(b)" ; } weird 1 : 2 3 ;
0
[ 2, 334, 12976, 2180, 5455, 60, 800, 3726, 3726, 31, 289, 14, 5196, 16, 48, 1797, 83, 44, 10975, 126, 137, 10975, 126, 172, 203, 47, 31, 164, 10975, 126, 137, 10975, 126, 172, 10975, 126, 203, 235, 22, 18, 14, 4001, 1797, 1828, 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...
Pass property itself to function as parameter in C# === I am looking for a method to pass property itself to a function. Not value of property. Function doesn't know in advance which property will be used for sorting. Simplest way in this example is: creating 4 overwrites with different parameter types. Other way is using of `typeof()` inside fucntion. Both these ways are unacceptable when Class1 has hundreds properties. So far I found following method: class Class1 { string vehName; int maxSpeed; int fuelCapacity; bool isFlying; } class Processor { void func1() { List<Class1> vehicles = new List<Class1>(); // ... fill the list vehicles = sortBy(vehicles, "maxSpeed"); } List<Class1> sortBy(List<Class1> toSort, string propName) { if (toSort != null && toSort.Count > 0) { return toSort.OrderBy(x => typeof(Class1).GetProperty(propName).GetValue(x, null)).ToList(); } else return null; } } I don't like this method because of risk of "human error" when passing string to processing function. When the string is generated by other part of code this is going be even more ugly. Please, suggest more elegant way to implement passing of Class1 property to function for further processing. The best option for usage IMHO will be (or something like this): vehicles = sortBy(vehicles, Class1.maxSpeed);
0
[ 2, 1477, 1354, 1145, 20, 1990, 28, 18906, 19, 272, 5910, 800, 3726, 3726, 31, 589, 699, 26, 21, 2109, 20, 1477, 1354, 1145, 20, 21, 1990, 9, 52, 1923, 16, 1354, 9, 1990, 1437, 22, 38, 143, 19, 3612, 56, 1354, 129, 44, 147, 26,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, how to find the maximum time in column A that is < the time in column B of the current row === I am having problems finding a solution for what I thought would be straight forward. Here is an example of what I am trying to do. TABLE A time | state 10:00 | up 10:09 | down 10:12 | up TABLE B time | data 10:05 | abc 10:07 | def 10:11 | ghi I would like to join tables A and B maintaining all data in B, something like SELECT tableB.time, tableB.data, tableA.status INTO my_results FROM tableB LEFT JOIN tableA WHERE tableB.time > (MAX(tableA.time) < tableB.time) So the my_results table would look like the following: TABLE my_results time | data | state 10:05 | abc | up 10:07 | def | up 10:11 | ghi | down
0
[ 2, 4444, 255, 15, 184, 20, 477, 14, 2979, 85, 19, 4698, 21, 30, 25, 13, 1, 14, 85, 19, 4698, 334, 16, 14, 866, 3131, 800, 3726, 3726, 31, 589, 452, 1716, 3007, 21, 4295, 26, 98, 31, 289, 83, 44, 1599, 917, 9, 235, 25, 40, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
RIght ZeroMQ topology === I need to write an Order Manager that routes client (stock, FX, whatever) orders to the proper exchange. The clients want to send orders, but know nothing about FIX or other proprietary protocols, only an internal (normalized) format for sending orders. I have applications (servers) that each connect through FIX/Binary/etc connections to each FIX/etc provider. I would like a broker in between the clients and the servers that take the normalized order to a given FIX provider. It is ok for the clients to specify a route, but it is up to a broker in between to route that order and manage the communications between clients and gateways. I have studied the ZMQ topologies, and REQ->ROUTER->DEALER doesn't work [the code works - I mean it is the wrong topology] since the servers are not identical. //This topology doesn't work because the servers are not identical #include "zhelpers.hpp" int main (int argc, char *argv[]) { // Prepare our context and sockets zmq::context_t context(1); zmq::socket_t frontend (context, ZMQ_ROUTER); zmq::socket_t backend (context, ZMQ_DEALER); frontend.bind("tcp://*:5559"); backend.bind("tcp://*:5560"); // Start built-in device zmq::device (ZMQ_QUEUE, frontend, backend); return 0; } I thought that maybe a ROUTER->ROUTER topology instead is correct, but I can't get the code to work, the clients send orders but never get responses back. I thought that using ZMQ_IDENTITY is the correct thing to do, but not only can I also not get this to work, but it seems as if ZMQ is moving away from ZMQ_IDENTITY? Can someone give a simple example of three programs [not in separate threads, three separate processes] that show the correct way to do this?
0
[ 2, 193, 4606, 79, 1251, 21661, 800, 3726, 3726, 31, 376, 20, 2757, 40, 389, 1382, 30, 5050, 6819, 13, 5, 7576, 15, 13, 16488, 15, 2099, 6, 3204, 20, 14, 4119, 1950, 9, 14, 7421, 259, 20, 2660, 3204, 15, 47, 143, 626, 88, 6098,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Use of Unassigned local variable === I encountered an error. Despite declaring the variables (failturetext and userName) errors still appear. Can anyone please help me? - Use of Unassigned local variable "FailureText" - Use of Unassigned local variable "UserName" protected void Login1_LoginError(object sender, System.EventArgs e) { TextBox FailureText; TextBox UserName; //There was a problem logging in the user //See if this user exists in the database MembershipUser userInfo = Membership.GetUser(UserName.Text); // errors appear here if (userInfo == null) { //The user entered an invalid username... //error appear here ( failuretext.text) FailureText.Text = "There is no user in the database with the username " + UserName.Text; } Thanks (:
0
[ 2, 275, 16, 13, 4140, 18, 13472, 375, 7612, 800, 3726, 3726, 31, 8208, 40, 7019, 9, 869, 15594, 14, 12157, 13, 5, 24910, 6418, 11969, 17, 4155, 7259, 6, 11908, 174, 1893, 9, 92, 1276, 2247, 448, 55, 60, 13, 8, 275, 16, 13, 414...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Sending verification request every single second to the server (repeating task) === I've some service that's being called by a Mobile app. The mobile app need to be up to date with the server. So, Every `1 second` I do check the server for any additional data, if found I got the data from the server (repeating task). Is there any problem from sending an HTTP request every single second (most of the time the response is very small, just to tell the client no data found)? I am using Oracle App server. Thanks.
0
[ 2, 4907, 25056, 3772, 352, 345, 153, 20, 14, 8128, 13, 5, 99, 1664, 1880, 3005, 6, 800, 3726, 3726, 31, 22, 195, 109, 365, 30, 22, 18, 142, 227, 34, 21, 3241, 4865, 9, 14, 3241, 4865, 376, 20, 44, 71, 20, 1231, 29, 14, 8128,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Type classe, generic memoization === Something quite odd is happening with y types and I quite dont understand if this is justified or not. I would tend to think not. This code works fine : type DictionarySingleton private () = static let mutable instance = Dictionary<string*obj, obj>() static member Instance = instance let memoize (f:'a -> 'b) = fun (x:'a) -> let key = f.ToString(), (x :> obj) if (DictionarySingleton.Instance).ContainsKey(key) then let r = (DictionarySingleton.Instance).[key] r :?> 'b else let res = f x (DictionarySingleton.Instance).[key] <- (res :> obj) res And this ones complains type DictionarySingleton private () = static let mutable instance = Dictionary<string*obj, _>() static member Instance = instance let memoize (f:'a -> 'b) = fun (x:'a) -> let key = f.ToString(), (x :> obj) if (DictionarySingleton.Instance).ContainsKey(key) then let r = (DictionarySingleton.Instance).[key] r :?> 'b else let res = f x (DictionarySingleton.Instance).[key] <- (res :> obj) res The difference is only the underscore in the dictionary definition. The infered types are the same, but the dynamic cast from r to type 'b exhibits an error. **'this runtime coercition ... runtime type tests are not allowed on some types, etc..'** Am I missing something or is it a rough edge ?
0
[ 2, 1001, 718, 62, 15, 12733, 22236, 1829, 800, 3726, 3726, 301, 1450, 4210, 25, 4942, 29, 13, 93, 2551, 17, 31, 1450, 1049, 1369, 100, 48, 25, 17002, 54, 52, 9, 31, 83, 5480, 20, 277, 52, 9, 48, 1797, 693, 1123, 13, 45, 1001, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
malloc function is not working properly in C program. the program crashes === I am beginner in C and this is my first program using malloc() function. I think there might be some problem in using this function.I wanted to use an array(cyclelength) where a solution for a range of number(user input) will be put. so the array size depends on user so i used malloc(). but the program is crashing. Here is my code: #include<stdio.h> #include<stdlib.h> int main() { int x,y,num,count,p,k; for(;;){ printf("enter first integer. must be between 1 and 100000\n"); scanf("%d", &x); printf("enter second integer. must be between 1 and 100000. must not equal the first integer.\n"); scanf("%d", &y); if(x>=1 && x<100000 && y>=1 && y<100000 && x!=y){ break; } else{ printf("try the whole process again\n"); } } if (x<y){ int j; j=y; y=x; x=j; } //making x always greater than y int *cyclelength=malloc(5000*sizeof(int)); if (NULL==cyclelength){ printf("process aborted"); } else{ /*solution part for the range of number. and solution for each number put into cyclelength.*/ num=y; while(num<=x){ p=1; k=num; while(k!=1){ if(k%2==0) k=k/2; else k=3*k+1; p+=1; } count=0; cyclelength[count]=p; num+=1; count+=1; } free(cyclelength); cyclelength=NULL; } int c=0; int max=cyclelength[c]; for(;c<x-y;c+=1){ if(max<cyclelength[c+1]){ max=cyclelength[c+1]; } } printf("%d,%d,%d",x,y,max); return 0; }
0
[ 2, 3668, 2499, 1990, 25, 52, 638, 7428, 19, 272, 625, 9, 14, 625, 21563, 800, 3726, 3726, 31, 589, 26931, 19, 272, 17, 48, 25, 51, 64, 625, 568, 3668, 2499, 5, 6, 1990, 9, 31, 277, 80, 530, 44, 109, 1448, 19, 568, 48, 1990, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Alternatives to jQuery FlexBox? === Are there any good alternatives to jQuery FlexBox? I need the functionality to select from auto-suggest drop down list and input new values like on a textbox.
0
[ 2, 2676, 18, 20, 487, 8190, 93, 14409, 5309, 60, 800, 3726, 3726, 50, 80, 186, 254, 2676, 18, 20, 487, 8190, 93, 14409, 5309, 60, 31, 376, 14, 18548, 20, 5407, 37, 3108, 8, 18, 21606, 1430, 2804, 125, 968, 17, 6367, 78, 4070, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
How render a Tree in html + php(codeIgniter) === I have an adjacency model list and this is the query: SELECT t1.FIO AS lev1, t2.FIO AS lev2, t3.FIO AS lev3, t4.FIO AS lev4, t5.FIO AS lev5, t6.FIO AS lev6, t7.FIO AS lev7, t8.FIO AS lev8, t9.FIO AS lev9, t10.FIO AS lev10, t11.FIO AS lev11, t12.FIO AS lev12, t13.FIO AS lev13, t14.FIO AS lev14, t15.FIO AS lev15, t16.FIO AS lev16, t17.FIO AS lev17, t18.FIO AS lev18, t19.FIO AS lev19, t20.FIO AS lev20, t21.FIO AS lev21, t22.FIO AS lev22, t23.FIO AS lev23, t24.FIO AS lev24 FROM users AS t1 LEFT JOIN users AS t2 ON t2.parent_id = t1.id LEFT JOIN users AS t3 ON t3.parent_id = t2.id LEFT JOIN users AS t4 ON t4.parent_id = t3.id LEFT JOIN users AS t5 ON t5.parent_id = t4.id LEFT JOIN users AS t6 ON t6.parent_id = t5.id LEFT JOIN users AS t7 ON t7.parent_id = t6.id LEFT JOIN users AS t8 ON t8.parent_id = t7.id LEFT JOIN users AS t9 ON t9.parent_id = t8.id LEFT JOIN users AS t10 ON t10.parent_id = t9.id LEFT JOIN users AS t11 ON t11.parent_id = t10.id LEFT JOIN users AS t12 ON t12.parent_id = t11.id LEFT JOIN users AS t13 ON t13.parent_id = t12.id LEFT JOIN users AS t14 ON t14.parent_id = t13.id LEFT JOIN users AS t15 ON t15.parent_id = t14.id LEFT JOIN users AS t16 ON t16.parent_id = t15.id LEFT JOIN users AS t17 ON t17.parent_id = t16.id LEFT JOIN users AS t18 ON t18.parent_id = t17.id LEFT JOIN users AS t19 ON t19.parent_id = t18.id LEFT JOIN users AS t20 ON t20.parent_id = t19.id LEFT JOIN users AS t21 ON t21.parent_id = t20.id LEFT JOIN users AS t22 ON t22.parent_id = t21.id LEFT JOIN users AS t23 ON t23.parent_id = t22.id LEFT JOIN users AS t24 ON t24.parent_id = t23.id LEFT JOIN users AS t25 ON t25.parent_id = t24.id WHERE t1.id = 16 this is a query to make 24 levels of depth using the adjacency model list and after that i make this: <? for($i = 0; $i < $query->num_rows(); $i++): ?> <? $row = $query->row($i); ?> <? for($n = 1; $n < 25; $n++): ?> <? $lev = "lev$n"; ?> <?= $row->$lev; ?> <? endfor; ?> <? endfor; ?> it render just the fields of every row, and i really don't know hot make it hieararchical, i am using codeigniter, what is better to use here rows or objects?? i need to make something like this: root_parent { parent_1 { child_1.name child_2.name child_3.name } parent_2 { child_1.name child_2.name child_3.name } parent_3 { child_1.name child_2.name child_3.name } } without repeatings is that possible?? please help!!!
0
[ 2, 184, 16535, 21, 1541, 19, 13, 15895, 2754, 13, 26120, 5, 9375, 9693, 242, 106, 6, 800, 3726, 3726, 31, 57, 40, 21, 43, 17920, 8883, 1061, 968, 17, 48, 25, 14, 25597, 45, 5407, 13, 38, 165, 9, 19221, 28, 9183, 165, 15, 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...
How to add class to diferent link === Hi I am trying to create a portfolio website.In order to not have to create the header several times for each page I have decided do add it using php include function.My only problem is that when I click to go to diferent pages the button that is active isen't changing properly.Here is my HTML: <ul id="main-menu"> <li><a href="index.php" class="active">home</a></li> <li><a href="about.php">about us</a></li> <li><a href="portfolio.php">portfolio</a></li> <li><a href="contact.php">contact</a></li> </ul> And here is my Javascrip code: $(document).ready(function(){ var $menu = $("ul#main-menu li a"); $menu.click(function(){ $menu.each(function(){ $(this).removeClass("active"); }) $(this).addClass("active"); }) }) I know the problem is that each time the page loads it resets the class "active" to the first link.What I do not know is how can I make the link to be added on the links I click?
0
[ 2, 184, 20, 3547, 718, 20, 926, 2407, 2291, 3508, 800, 3726, 3726, 4148, 31, 589, 749, 20, 1600, 21, 10588, 2271, 9, 108, 389, 20, 52, 57, 20, 1600, 14, 157, 106, 238, 436, 26, 206, 2478, 31, 57, 868, 107, 3547, 32, 568, 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...
An alternative to nosetests which works well with Python 3.2 === I'm porting my JenkinsAPI project to Python3. Previously I used a utility called "nose" which has a versatile test-runner which is capable of generating junit XML output when I run a suite of unit-tests. I've noticed that nose does not seem to run that well on Python 3.x. I often get errors like the one in this issue (https://github.com/nose-devs/nose/issues/134). Is there an alternative? What's the best way to run unit-tests and get junit-style XML output given that I am using Python 3.2? I'd like to only use official releases - I want other people to be able to easily verify my test-suite. That means even though it might be possible to clone the latest version from git or apply simple patches, it's going to be a nightmare for others to follow me. So I'm only interested (initially) in packages which are cross-platform and easily available from pypi. For now my primary development platform us Ubuntu 12.4 64bit, however eventually I need my product to work on just about any kind of computer that supports python 3.x.
0
[ 2, 40, 2676, 20, 2689, 10543, 18, 56, 693, 134, 29, 20059, 203, 9, 135, 800, 3726, 3726, 31, 22, 79, 1295, 68, 51, 11420, 2552, 49, 669, 20, 20059, 240, 9, 1343, 31, 147, 21, 10082, 227, 13, 7, 22626, 7, 56, 63, 21, 26278, 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...
Unable to load a module error in django on apache server === This is such a strange thing I am unable to understand it. This is my django file directory hierarchy in brief project/ apache/ django.wsgi project/ __init__.py, settings.py, urls.py .. services/ __init__.py apis/ __init__.py fparser.py wservice.py ... profile.py So, everything works fine in development server and even on heroku (gunicorn) but isn't working on apache (localhost) when I was opening the page: Its showing Exception Type: ImportError at / Exception Value: cannot import name website_feed_address this `website_feed_address` is located at profile.py the `import error` was found at `fparser.py` how should I fix it?
0
[ 2, 2343, 20, 6305, 21, 12613, 7019, 19, 3857, 14541, 27, 17140, 8128, 800, 3726, 3726, 48, 25, 145, 21, 2578, 584, 31, 589, 2343, 20, 1369, 32, 9, 48, 25, 51, 3857, 14541, 3893, 16755, 14417, 19, 2698, 669, 118, 17140, 118, 3857, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
TBB ThreadingBuildingBlocks strange behaviour === My Question: Why is my program freezing if i use "read only" const_accessors? It seems to be locking up, from the API description it seems to be ok to have one accessors and multiple const_accessors, (writer, reader). Maybe somebody can tell me a different story. The Goal i try to achieve is to use this concurrent hash map and make it available to 10-200 Threads so that they can lookup and add/delete information. If you have a better solution than the current one i' am using than you also welcome to post the alternatives. tbb::size_t hashInitSize = 1200000; concurrent_hash_map<long int,char*> hashmap(hashInitSize); cout << hashmap.bucket_count() << std::endl; long int l = 200; long int c = 201; concurrent_hash_map<long int,char*>::accessor o; concurrent_hash_map<long int,char*>::const_accessor t; concurrent_hash_map<long int,char*>::const_accessor h; cout << "Trying to find 200 "<< hashmap.find(t,200) << std::endl; hashmap.insert(o,l); o->second = "testother";
0
[ 2, 13, 38, 3490, 9322, 68, 11783, 12048, 18, 2578, 7727, 800, 3726, 3726, 51, 1301, 45, 483, 25, 51, 625, 14278, 100, 31, 275, 13, 7, 10647, 104, 7, 11608, 38, 1, 20604, 248, 18, 60, 32, 2206, 20, 44, 17538, 71, 15, 37, 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...
UIBarButton in a UITableViewCell doesn't detect tap properly? === I have a UIToolbar inside my UITableViewCell. During Edit mode in order to trigger the button click (UIBarButton inside toolbar), it requires me to tap the button 2 times. The first time it doesn't detect a tap. What could be possibly causing the behavior? During EditMode I disable selection on UITableView,The default delete button on the right side detects taps correctly. Here is my cell structure? - Custom Cell (UITableViewCell) - EditView (UIView) - UIToolbar - Cancel (UIBarButtonItem) - Save (UIBarButtonItem) - Delete (UIBarButtonItem)
0
[ 2, 13, 5661, 1850, 811, 444, 19, 21, 13, 11193, 579, 4725, 9725, 1437, 22, 38, 9092, 5526, 7428, 60, 800, 3726, 3726, 31, 57, 21, 13, 5661, 20799, 1850, 572, 51, 13, 11193, 579, 4725, 9725, 9, 112, 9392, 3740, 19, 389, 20, 7286,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
int() argument must be a string or a number, not 'Meeting' === Consider this function i am using Django along tornadoweb def MeetingRecord(userid,mtngid,mesg): obj = Usage() obj.name = userid obj.meeting_id = mtngid obj.action = mesg # obj.participantid = participantid obj.save() here is the model class Usage(models.Model): user = models.ForeignKey('User',related_name = 'usage_user',null = True) meeting = models.ForeignKey('Meeting',related_name = 'meeting_usages',null = True) participant= models.ForeignKey('Participant',related_name = 'meeting_participant_id',null = True) date = models.DateTimeField(auto_now = True) action = models.CharField(max_length = 500) miscellaneous = models.CharField(max_length = 500) I am calling this method from a tornado class like `MeetingRecord(check_user_exist,mtng,mesg)` but i am getting following trackback Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/tornado-2.3-py2.7.egg/tornado/web.py", line 1021, in _execute getattr(self, self.request.method.lower())(*args, **kwargs) File "tornado_main.py", line 383, in post MeetingRecord(check_user_exist,mtng,mesg) File "tornado_main.py", line 503, in MeetingRecord obj.save() File "/usr/local/lib/python2.7/dist-packages/Django-1.4-py2.7.egg/django/db/models/base.py", line 463, in save self.save_base(using=using, force_insert=force_insert, force_update=force_update) File "/usr/local/lib/python2.7/dist-packages/Django-1.4-py2.7.egg/django/db/models/base.py", line 551, in save_base result = manager._insert([self], fields=fields, return_id=update_pk, using=using, raw=raw) File "/usr/local/lib/python2.7/dist-packages/Django-1.4-py2.7.egg/django/db/models/manager.py", line 203, in _insert return insert_query(self.model, objs, fields, **kwargs) File "/usr/local/lib/python2.7/dist-packages/Django-1.4-py2.7.egg/django/db/models/query.py", line 1576, in insert_query return query.get_compiler(using=using).execute_sql(return_id) File "/usr/local/lib/python2.7/dist-packages/Django-1.4-py2.7.egg/django/db/models/sql/compiler.py", line 909, in execute_sql for sql, params in self.as_sql(): File "/usr/local/lib/python2.7/dist-packages/Django-1.4-py2.7.egg/django/db/models/sql/compiler.py", line 872, in as_sql for obj in self.query.objs File "/usr/local/lib/python2.7/dist-packages/Django-1.4-py2.7.egg/django/db/models/fields/related.py", line 964, in get_db_prep_save connection=connection) File "/usr/local/lib/python2.7/dist-packages/Django-1.4-py2.7.egg/django/db/models/fields/__init__.py", line 292, in get_db_prep_save prepared=False) File "/usr/local/lib/python2.7/dist-packages/Django-1.4-py2.7.egg/django/db/models/fields/__init__.py", line 284, in get_db_prep_value value = self.get_prep_value(value) File "/usr/local/lib/python2.7/dist-packages/Django-1.4-py2.7.egg/django/db/models/fields/__init__.py", line 537, in get_prep_value return int(value) TypeError: int() argument must be a string or a number, not 'Meeting' I would like to confirm it that userid is the instance of User class and mtngid is the instance of meeting class . Please help me out why i am getting this error .
0
[ 2, 19, 38, 5, 6, 5476, 491, 44, 21, 3724, 54, 21, 234, 15, 52, 13, 22, 22165, 68, 22, 800, 3726, 3726, 3563, 48, 1990, 31, 589, 568, 3857, 14541, 303, 12306, 14113, 6312, 1235, 14953, 5, 3699, 5175, 15, 79, 38, 2723, 1340, 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...
'Swipe' on iPhone (native App) using HTML5, jQueryMobile and PhoneGap === I've seen a number of tutorials for using the swipe gesture with HTML5. These seem to work fine until I run them as a native iPhone app using PhoneGap. I've recently come across [this post][1] which provides an example that does work! Code: $("#homepage").live( 'pageinit',function(event) { //Add Back Button To pages $.mobile.page.prototype.options.addBackBtn = "true"; $.mobile.page.prototype.options.backBtnText = "Go Back"; $('li').each(function(index) { var elementId = $(this).attr("id"); var rel = $(this).attr("rel"); var text = $(this).text(); elementId = '#'+elementId; var link = elementId + '.php'; //Add event listener for each li $(function() { $(elementId).live('swipe', function(event) { //Load page that you swiped on. $.mobile.changePage( elementId, {transition: "slideup"} ); }); }); }); }); </script> I need to change the code above to support an action when a Div is swipped - not a list. This is my code so far: $("#homepage").live( 'pageinit',function(event) { $(function() { $("#swipeDiv").live('swipe', function(event) { alert("Hello"); }); }); }); This works fine in browsers, but not when loaded as a native app. Any suggestions on what I need to change to get it working? Many thanks. [1]: http://tuts.pinehead.tv/2012/01/10/jquery-mobile-advanced-topics-changepage-pageinit-and-swipe-events/
0
[ 2, 13, 22, 18, 27803, 62, 22, 27, 21024, 13, 5, 21525, 4865, 6, 568, 13, 15895, 264, 15, 487, 8190, 93, 12571, 17, 1132, 1136, 306, 800, 3726, 3726, 31, 22, 195, 541, 21, 234, 16, 29724, 18, 26, 568, 14, 27246, 7222, 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...
communicate of two context root in one ear jboss === I'm having a EAR file in that EAR file i'm having two WAR file wit different context root.Now i need to communicate these two war by using JBOSS The file structure is<br/> XXX.ear<br/> |----->META-INF---> application.xml and jboss-web.xml<br/> |----->AAAA.war<br/> |----->BBBB.war<br/> I have include context root in WEB-INF/jboss-web.xml seperately of each war file and in that META-INF i have included the both context root.. Thanks
0
[ 2, 8709, 16, 81, 4141, 5900, 19, 53, 2330, 487, 10349, 18, 800, 3726, 3726, 31, 22, 79, 452, 21, 2330, 3893, 19, 30, 2330, 3893, 31, 22, 79, 452, 81, 176, 3893, 9642, 421, 4141, 5900, 9, 1387, 31, 376, 20, 8709, 158, 81, 176, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
awk exiting the ACTION path and going directly to END part === I am using an awk script and the skeleton of the same is simple awk ' BEGIN { Variable declaration } { ACTION PART } END { }' FILE A The file A is such a huge file. So I wanted not to traverse the entire file and so what I am trying to do is, I am trying to keep some checks in ACTION PART in such a way that if that check is successful, then I need to skip reading the rest part of the file and directly go to END part. My question is how would I redirect the script from ACTION PART to END Part based on the condition.. I am looking for some kind of command like "break" in for loop. Could you people share your ideas. Thank you.
0
[ 2, 13, 3885, 197, 24999, 14, 1028, 2013, 17, 228, 1703, 20, 241, 141, 800, 3726, 3726, 31, 589, 568, 40, 13, 3885, 197, 3884, 17, 14, 11714, 16, 14, 205, 25, 1935, 13, 3885, 197, 13, 22, 2348, 13, 1, 7612, 7098, 13, 1, 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 duplicate php.ini of existing server? === I'm working on a CMS-based website and I would like to configure my LAMP setup as close to the server it should run on as possible. What is the best way to do this? How do *you* do that? I guess I'm looking for general advice. Do you just go to phpinfo() and look for the problematic parts? (In that case, what *are* the "problematic parts"?) Is there a better way?
0
[ 2, 184, 20, 19429, 13, 26120, 9, 2651, 16, 3149, 8128, 60, 800, 3726, 3726, 31, 22, 79, 638, 27, 21, 2390, 18, 8, 1281, 2271, 17, 31, 83, 101, 20, 1065, 15951, 51, 6792, 18161, 28, 543, 20, 14, 8128, 32, 378, 485, 27, 28, 93...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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++ Worker threads with Builder (Borland Libraries) === I have an application that basically has a GUI and a function that is responsible for running my main program and the creation of objects. Currently my GUI will crash as there is too much background work going on when the background work is complete it will come back to life again. I need to create a worker thread (we do not need an interface thread as my GUI only shows progress of what is happening.), the worker thread will run my function and the other worker thread will run my GUI. Im struggling to find any information on this. Google does not seem to be helping, could any one point me to some useful information? At the moment I have something like this: void __fastcall TfrmRunning::FormCreate(TObject *Sender) { //Does most of my background stuff when this form is created }
0
[ 2, 272, 20512, 7444, 20396, 29, 14960, 13, 5, 6157, 618, 8649, 6, 800, 3726, 3726, 31, 57, 40, 3010, 30, 11374, 63, 21, 9457, 17, 21, 1990, 30, 25, 1864, 26, 946, 51, 407, 625, 17, 14, 2502, 16, 3916, 9, 871, 51, 9457, 129, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
storing twiki post data in mysql database === TWiki is good wiki project. I have implemented it and using. Bydefault Twiki stores data in files with extension .txt, is any plugin/method to store post data in mysql database? How can I store data in mysql database for TWiki?
0
[ 2, 25615, 13, 38, 17375, 678, 1054, 19, 51, 18, 22402, 6018, 800, 3726, 3726, 13, 38, 17375, 25, 254, 13, 17375, 669, 9, 31, 57, 6807, 32, 17, 568, 9, 34, 13862, 9708, 13, 38, 17375, 4134, 1054, 19, 6488, 29, 3896, 13, 9, 38, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Running ExtJS app in Internet Explorer === Though i removed trailing comma, in my mvc project, it's not loading in IE 8. Can building this app for deployment resolve this issue ? I'm not sure why this issue occurs
0
[ 2, 946, 1396, 38, 728, 18, 4865, 19, 2620, 8520, 800, 3726, 3726, 362, 31, 1974, 14323, 11951, 58, 15, 19, 51, 307, 8990, 669, 15, 32, 22, 18, 52, 12797, 19, 13, 660, 469, 9, 92, 353, 48, 4865, 26, 10475, 9854, 48, 1513, 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, 0, 0, 0, 0, 0, 0, 0...
highcharts 2.1.4 tooltip is shifted in chrome browser === I have set up this page http://s-maof.com/PRO/index3.php?fkapp=2 you have to mouse over the lower bar to view the charts. if you try it on FF - you can notice that the tooltip is displayed properly. On chrome, though, the tooltip displays when the mouse curser is shifted. can anyone explaing this bug?
0
[ 2, 183, 5433, 38, 18, 172, 9, 165, 9, 300, 5607, 10169, 25, 4106, 19, 13, 12985, 16495, 800, 3726, 3726, 31, 57, 309, 71, 48, 2478, 7775, 6903, 18, 8, 540, 1041, 9, 960, 118, 2740, 118, 25671, 240, 9, 26120, 60, 410, 197, 7753...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Objective-C with C++ Member Initialization === I have a C++ object declared in my Objective-C class. The C++ object has only one constructor that takes several parameters. In C++ code I would parse the parameters to the constructor in the initializer list of the class that contains it. How do I do the same in Objective-C? When I compile I get an error telling me that there is no appropriate default constructor for my C++ object, as you would expect.
0
[ 2, 7038, 8, 150, 29, 272, 20512, 322, 2104, 1829, 800, 3726, 3726, 31, 57, 21, 272, 20512, 3095, 2482, 19, 51, 7038, 8, 150, 718, 9, 14, 272, 20512, 3095, 63, 104, 53, 6960, 248, 30, 1384, 238, 12905, 9, 19, 272, 20512, 1797, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
MVC non constant for attribute argument to sync with Membership properties === First off, I'm fairly new to MVC but have an existing project in MVC3 and playing around with MVC4 so answers for both versions are appreciated. In my mvc View I have this line: Passwords must be at least @Membership.MinRequiredPasswordLength characters long. and in the Model I have this: [Required] [StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)] [DataType(DataType.Password)] [Display(Name = "Password")] public string Password { get; set; } (These were auto generated for an MVC template project) My web.config MembershipProvider has this attribute: minRequiredPasswordLength="8" The problem with this is that the user will be informed that the min length is 8 but the actual validation will be 6. Naturally, I can set both to the same value but I wanted to know if there is an easy way to only make use of one of them or syncing both. I've tried this: [StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = Membership.MinRequiredPasswordLength)] but get the error 'An attribute argument must be a constant expression,...' Alternatively, can I display what the MinimumLenght of the model is in the view? How can I have only one place to make a change?
0
[ 2, 307, 8990, 538, 3587, 26, 35, 14755, 5476, 20, 6063, 150, 29, 4363, 3704, 800, 3726, 3726, 64, 168, 15, 31, 22, 79, 6647, 78, 20, 307, 8990, 47, 57, 40, 3149, 669, 19, 307, 8990, 240, 17, 791, 140, 29, 307, 8990, 300, 86, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 echo a variable within a string in php? === I am trying to use the contents of `$row['file_name']` at the end of the checkbox input field and also use it for the `value=""`. <?php echo "<form action=\"process.php\" method=\"post\">"; while($row = mysql_fetch_array($result)) { echo "<input type=\"checkbox\" name=\"opt[]\" value=\" \" /> " . $row['file_name']; echo "<br />"; } echo "<br><br>"; echo "<input type=\"submit\" name=\"formSubmit\" value=\"Send\" />"; echo "</form>"; ?>
0
[ 2, 184, 92, 31, 8117, 21, 7612, 363, 21, 3724, 19, 13, 26120, 60, 800, 3726, 3726, 31, 589, 749, 20, 275, 14, 8478, 16, 13, 1, 4403, 5417, 2558, 22, 16877, 1, 7259, 22, 500, 1, 35, 14, 241, 16, 14, 2631, 5309, 6367, 575, 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...
AppendHeader doesn't add to HttpResponseBase.Headers collection === I'm stuck writing a unit test for a custom ActionFilter in ASP.NET MVC. Everything works fine but I'm having a strange behavior in my unit test. [`AppendHeader`][1] seems not to modify the `HttpResponseBase.Headers` collection. When I debug the following code, I have only two items in my collection: `"A"` and `"C"`. var responseStub = new Moq.Mock<HttpResponseBase>(); responseStub.Setup(r => r.Headers) .Returns(new WebHeaderCollection { { "A", "A" } }); var response = responseStub.Object; response.AppendHeader("B", "B"); response.Headers.Add(new NameValueCollection { { "C", "C" } }); Can somebody shed some light on this and explain why this is behaving like that? If I run the Website using `AppendHeader` in my ActionFilter I'm getting the header. So it generally works, but as I said, I'm missing it in my `HttpResponseBase.Headers` collection for testing. Or is there another good way to test this? [1]: http://msdn.microsoft.com/en-us/library/system.web.httpresponse.appendheader.aspx
0
[ 2, 4865, 2451, 1743, 106, 1437, 22, 38, 3547, 20, 7775, 99, 18, 8782, 870, 8436, 9, 1743, 445, 1206, 800, 3726, 3726, 31, 22, 79, 4549, 1174, 21, 1237, 1289, 26, 21, 5816, 1028, 11924, 815, 19, 28, 306, 9, 2328, 307, 8990, 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...
Create datagridview with combobox in the second column === I am trying to create a datagridview with a combobox in the second column. Currently my datagrid is bound to a datatable. The field patient is what I need to have in the combobox. The code below adds the field but it is at the end of the grid and is duplicated...i.e there are 2 patient fields. DataTable dt = new DataTable(); DataColumn dtColumn; dtColumn = new DataColumn("ClmDate", typeof(String)); dt.Columns.Add(dtColumn); dtColumn = new DataColumn("Patient", typeof(Decimal)); dt.Columns.Add(dtColumn); dtColumn = new DataColumn("ClmAmt", typeof(Decimal)); dt.Columns.Add(dtColumn); cService cservice = new cService(); var trans = cservice.ClmView(txtNo.Text.Trim()); if (trans != null) { // Add items to datatable foreach (var t in trans) { //save to datatable DataRow row = dt.NewRow(); row["clmdate"] = t.clmdate.ToShortDateString(); row["patient"] = t.patient; row["clmAmt"] = t.clmamt; dt.Rows.Add(row); } } Grid_Refresh(); private void Grid_Refresh() { grdTrans.DataSource = dt; DataGridViewComboBoxColumn cb = new DataGridViewComboBoxColumn(); cb.HeaderText = "Patient"; cb.Name = "Patient"; cb.Items.Add("Foo"); cb.Items.Add("Bar"); grdTrans.Columns.Add(cb); } Below would be an image of the grid I am trying to reproduce... http://s13.postimage.org/aale668uf/grd.png Any help is appreciated.
0
[ 2, 1600, 1054, 16375, 4725, 29, 22621, 5309, 19, 14, 153, 4698, 800, 3726, 3726, 31, 589, 749, 20, 1600, 21, 1054, 16375, 4725, 29, 21, 22621, 5309, 19, 14, 153, 4698, 9, 871, 51, 1054, 16375, 25, 4138, 20, 21, 1054, 5924, 9, 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...
.on() not detecting dom change === Having some problems getting my .on() working. My site is here: www.eliteweb-creation.co.uk/dev/ if you take a look at: www.eliteweb-creation.co.uk/dev/js/nav.js I am setting up some on mouseenter & mouseleave event handlers on $('a.left.active') The anchors have .active added to them dynamically when clicked on, hence using .on() instead of .click() so that the jquery detects the dom changes and adds the event handler. My .on("click") for the anchors before adding the .active class are working fine, the issue seems to be for on not detecting the class change. Any and all help is appreciated.
0
[ 2, 13, 9, 218, 5, 6, 52, 9092, 68, 11859, 753, 800, 3726, 3726, 452, 109, 1716, 1017, 51, 13, 9, 218, 5, 6, 638, 9, 51, 689, 25, 235, 45, 13, 6483, 9, 62, 10601, 14113, 8, 6037, 857, 9, 716, 9, 2185, 118, 14438, 118, 100, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Thread-safety / reusability / life-span of AmazonDynamoDBClient? === I'm curious what is the thread-safety and reusability is for the primary DynamoDB entry point `AmazonDynamoDBClient` in the Java SDK? I noticed this statement in the JavaDocs for `DynamoDBMapper`: > "This class is thread-safe and can be shared between threads. It's also very lightweight, so it doesn't need to be." Since `DynamoDBMapper` takes a reference to `AmazonDynamoDBClient`, does that mean that `AmazonDynamoDBClient` is similar? I also thought I saw somewhere that it was *encouraged* to keep and share the `AWSCredentials` because it allowed better management of throttling and session? Since the credentials are the primary dependency of `AmazonDynamoDBClient`, this might also support it having a longer life span?
0
[ 2, 9322, 8, 18166, 1084, 13, 118, 302, 267, 4091, 13, 118, 201, 8, 18, 3206, 16, 8059, 1851, 325, 13670, 7229, 18513, 38, 60, 800, 3726, 3726, 31, 22, 79, 7686, 98, 25, 14, 9322, 8, 18166, 1084, 17, 302, 267, 4091, 25, 26, 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...
size_t return pointer subtraction === I want to return the length of a string by passing a pointer along until it comes to an end. I have to use size_t as return type and thought i could return the length by subtracting 0 from the length of s1. but im getting the following error message......error: invalid conversion from ‘const char*’ to ‘size_t’ #include <stdio.h> size_t strlen(const char *s1); int main(void) { const char str[] = "HELLO"; printf("%s contains %d non null characters\n", str, (int)strlen(str)); return 0; } size_t strlen(const char *s1) { while (*s1) { s1++; } return s1 - 0; }
0
[ 2, 1072, 1, 38, 788, 454, 106, 27031, 872, 800, 3726, 3726, 31, 259, 20, 788, 14, 1476, 16, 21, 3724, 34, 2848, 21, 454, 106, 303, 163, 32, 1624, 20, 40, 241, 9, 31, 57, 20, 275, 1072, 1, 38, 28, 788, 1001, 17, 289, 31, 11...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 do I install DoctrineMongoODMBundle on a Mac === I get this: Problem 1 - doctrine/mongodb dev-master requires ext-mongo * -> no matching package found. - doctrine/doctrine-mongo-odm-module dev-master requires doctrine/mongodb-odm dev-master -> satisfiable by doctrine/mongodb-odm dev-master. - doctrine/mongodb-odm dev-master requires doctrine/mongodb dev-master -> satisfiable by doctrine/mongodb dev-master. - Installation request for doctrine/doctrine-mongo-odm-module dev-master -> satisfiable by doctrine/doctrine-mongo-odm-module dev-master. I have mongo and it's php extension installed on my Mac, but still no joy. Any thoughts?
0
[ 2, 184, 107, 31, 16146, 7521, 2111, 3264, 79, 9930, 413, 27, 21, 1572, 800, 3726, 3726, 31, 164, 48, 45, 1448, 137, 13, 8, 7521, 118, 2111, 5474, 220, 9664, 8, 4594, 4781, 1396, 38, 8, 2111, 839, 1637, 13, 8, 1, 90, 10120, 603...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 replace array id keys === I'm using a single mysql query to create a multidimensional array for nested results (categories and subcategories). Query SELECT `categories`.`cat_title`, `subcategories`.`sub_cat_id`, `subcategories`.`sub_cat_title` FROM (`categories`) LEFT JOIN `subcategories` ON `subcategories`.`cat_id` = `categories`.`cat_id` ORDER BY `categories`.`cat_title Creating multidimensional array $array = array(); foreach ($query->result_array() as $row): //query result as a pure array $array[$row['cat_title']][] = $row['sub_cat_title']; endforeach; return $array; The above returns categories and and their respective subcategories. Array ( [Art] => Array ( [0] => Graphic Design [1] => Painting ) [Literature] => Array ( [0] => Science Fiction [1] => Poetry [2] => Fiction ) [Science] => Array ( [0] => Environmental ) ) Is it possible to replace the array keys with query data like the subcategory id `sub_cat_id`? For example [Literature] => Array ( [8] => Science Fiction [94] => Poetry [5] => Fiction )
0
[ 2, 13, 26120, 3934, 7718, 4924, 5534, 800, 3726, 3726, 31, 22, 79, 568, 21, 345, 51, 18, 22402, 25597, 20, 1600, 21, 1889, 7865, 7718, 26, 5618, 69, 1736, 13, 5, 14375, 1596, 17, 972, 14375, 1596, 6, 9, 25597, 5407, 13, 1, 14375...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
tips'n'tricks in awk === I'm looking for caveats, tips'n'tricks etc. for awk. For example: awk '$9=="404"{a[$7]++}END{for(i in a)print a[i],i}' access.log|less this code, will print errors aggregated by page path. There is a trick, to sort an array by setting WHINY_USERS to any, nonzero value, to automatically use isort function on array before printing: WHINY_USERS=1 awk '$9=="404"{a[$7]++}END{for(i in a)print a[i],i}' access.log|less This code will return same errors but sorted by the key name (path). I'm looking for more tricks like this one - do you know any resource which has them listed? could you share best tricks you know? I've never found awk wiki - only same old tuts repeated over and over...
4
[ 2, 11034, 22, 103, 22, 15294, 18, 19, 13, 3885, 197, 800, 3726, 3726, 31, 22, 79, 699, 26, 3542, 721, 18, 15, 11034, 22, 103, 22, 15294, 18, 2722, 9, 26, 13, 3885, 197, 9, 26, 823, 45, 13, 3885, 197, 13, 22, 4403, 518, 3726,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Return value from javascript function. === In my code, I need to return 'ret' being called from `imagesLoaded` to the outer return. How can I do this? var imgPreload = new Image(); var ret; imgPreload.src = 'scripts/php/timthumb.php?src='+$test[$iterator][2]+'&q=100&w=300'; $(".imgHolder").append('<img src="'+imgPreload.src+'"/>'); //console.log(imgPreload); $(".imgHolder").imagesLoaded(function(){ ret = '<div class="box" style="width:18%;">' +'<p>'+$test[$iterator][1][2]['name']+'</p>' +'<img src="'+imgPreload.src+'"/>' +'<div id=boxBottom>'+Math.floor($test[$iterator][0]*100)+'%</div>' +'</div>' }); return ret;
0
[ 2, 788, 1923, 37, 8247, 8741, 1990, 9, 800, 3726, 3726, 19, 51, 1797, 15, 31, 376, 20, 788, 13, 22, 6239, 22, 142, 227, 37, 13, 1, 22039, 18, 22546, 1, 20, 14, 4896, 788, 9, 184, 92, 31, 107, 48, 60, 4033, 797, 263, 3515, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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: Remote Runspace vs. remote sessions === I need to run commands remotely on a different machine programmatically and am using powershell (from c#) for it. I would like to know the pros and cons of using - remote runspace and running the commnds using the powershell pipeline vs - local runspace and using new-pssession, invoke-command to create session to the remote machine and invoke commands. Let us say I am not interested in the fan-out capabilities for now. Also, how does this change as I have more machines I want to execute different commands on. Thanks
0
[ 2, 414, 15984, 45, 5388, 485, 5582, 4611, 9, 5388, 5763, 800, 3726, 3726, 31, 376, 20, 485, 14294, 23288, 27, 21, 421, 1940, 625, 6732, 1326, 17, 589, 568, 414, 15984, 13, 5, 2665, 272, 5910, 6, 26, 32, 9, 31, 83, 101, 20, 143...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...