PostId
int64
4
11.8M
PostCreationDate
stringlengths
19
19
OwnerUserId
int64
1
1.57M
OwnerCreationDate
stringlengths
10
19
ReputationAtPostCreation
int64
-55
461k
OwnerUndeletedAnswerCountAtPostTime
int64
0
21.5k
Title
stringlengths
3
250
BodyMarkdown
stringlengths
5
30k
Tag1
stringlengths
1
25
Tag2
stringlengths
1
25
Tag3
stringlengths
1
25
Tag4
stringlengths
1
25
Tag5
stringlengths
1
25
PostClosedDate
stringlengths
19
19
OpenStatus
stringclasses
5 values
unified_texts
stringlengths
32
30.1k
OpenStatus_id
int64
0
4
11,734,575
07/31/2012 06:47:08
216,942
11/23/2009 11:13:42
520
61
Intimate to another service when current service crashed (hosted on different server)
I have two services which are hosted on two different servers. Lets say, Service A on server A and Service B on server B. My service B is dependent on service A. I want to implement functionality like when Service B is crashed/stop explicitly (due to some reason), I want to intimate Service A that Service B is crashed and I need to stop service A too. May I know how can I achieve this functionality? **NOTE** : I have catches all the possible exception in my application but due to some DB problem or some unhandled exception (which didn't come during validation environment) I need to put this functionality.
c#
msmq
null
null
null
null
open
Intimate to another service when current service crashed (hosted on different server) === I have two services which are hosted on two different servers. Lets say, Service A on server A and Service B on server B. My service B is dependent on service A. I want to implement functionality like when Service B is crashed/stop explicitly (due to some reason), I want to intimate Service A that Service B is crashed and I need to stop service A too. May I know how can I achieve this functionality? **NOTE** : I have catches all the possible exception in my application but due to some DB problem or some unhandled exception (which didn't come during validation environment) I need to put this functionality.
0
11,722,597
07/30/2012 13:29:14
1,069,254
11/28/2011 11:44:42
318
9
Where to recreate the activity?
Ok, I've spent hours on this.. time to ask to stackoverflow! I've implemented two simple themes on my app, you can select them inside a SettingsActivity (extending PreferenceActivity). At this point, when you change theme, it's applied only on the new created activities because the activity from where you called the settings is an old one in the activity stack. I've searched a lot and I've found this pretty useful: [how to restart an activity][1]. By the way, I'm not completely clear on WHERE put this code. The only way to make it works was to put it in the onRestart() method, but this is a HUGE wasting of cpu, battery and user experience. Any help? [1]: http://stackoverflow.com/questions/1397361/how-do-i-restart-an-android-activity
android
android-activity
preferenceactivity
android-theme
null
null
open
Where to recreate the activity? === Ok, I've spent hours on this.. time to ask to stackoverflow! I've implemented two simple themes on my app, you can select them inside a SettingsActivity (extending PreferenceActivity). At this point, when you change theme, it's applied only on the new created activities because the activity from where you called the settings is an old one in the activity stack. I've searched a lot and I've found this pretty useful: [how to restart an activity][1]. By the way, I'm not completely clear on WHERE put this code. The only way to make it works was to put it in the onRestart() method, but this is a HUGE wasting of cpu, battery and user experience. Any help? [1]: http://stackoverflow.com/questions/1397361/how-do-i-restart-an-android-activity
0
11,734,576
07/31/2012 06:47:13
1,561,466
07/29/2012 20:00:45
8
0
php get file name and image and write in a file
The following script writes to a file include.php $path = "./files/"; $path2="http://".$_SERVER['SERVER_NAME'].dirname($_SERVER["PHP_SELF"])."/files/"; //echo $path2; $folder = opendir($path); $start=""; $Fnm = "./include.php"; $inF = fopen($Fnm,"w"); fwrite($inF,$start."\n"); while( $file = readdir($folder) ) { if (($file != '.')&&($file != '..')&&($file != 'index.htm')) { $result="{\nlevels: [\n{ file: \"$path2$file\" }\n],\n\ntitle: \"$file\"\n},\n"; fwrite($inF,$result); } } fwrite($inF,""); closedir($folder); fclose($inF); It searches the folder and look for any file and store it in $path2$file so the result posted in include.php is (If the folder has one file) { levels: [ { file: "path to/files/filename" } ], title: "filename" }, and if the folder has 2 files result is { levels: [ { file: "path to/files/filename1" } ], title: "filename2" }, { levels: [ { file: "path to/files/filename2" } ], title: "filename2" }, and so on... What I need is to search for another folder /images and write the same image file in include.php just below: { file: "path to/files/filename1" } So the result will be { levels: [ { file: "path to/files/filename1" } ], image: "path to/images/imagefilename1", title: "filename2" }, and it will post the same image path for every image file in images folder I have tried to incorporate the same code with slight variable changes but I am stuck at using while Any advice ?
php
append
fopen
fwrite
null
null
open
php get file name and image and write in a file === The following script writes to a file include.php $path = "./files/"; $path2="http://".$_SERVER['SERVER_NAME'].dirname($_SERVER["PHP_SELF"])."/files/"; //echo $path2; $folder = opendir($path); $start=""; $Fnm = "./include.php"; $inF = fopen($Fnm,"w"); fwrite($inF,$start."\n"); while( $file = readdir($folder) ) { if (($file != '.')&&($file != '..')&&($file != 'index.htm')) { $result="{\nlevels: [\n{ file: \"$path2$file\" }\n],\n\ntitle: \"$file\"\n},\n"; fwrite($inF,$result); } } fwrite($inF,""); closedir($folder); fclose($inF); It searches the folder and look for any file and store it in $path2$file so the result posted in include.php is (If the folder has one file) { levels: [ { file: "path to/files/filename" } ], title: "filename" }, and if the folder has 2 files result is { levels: [ { file: "path to/files/filename1" } ], title: "filename2" }, { levels: [ { file: "path to/files/filename2" } ], title: "filename2" }, and so on... What I need is to search for another folder /images and write the same image file in include.php just below: { file: "path to/files/filename1" } So the result will be { levels: [ { file: "path to/files/filename1" } ], image: "path to/images/imagefilename1", title: "filename2" }, and it will post the same image path for every image file in images folder I have tried to incorporate the same code with slight variable changes but I am stuck at using while Any advice ?
0
11,734,577
07/31/2012 06:47:20
77,993
03/14/2009 05:26:56
1,568
0
Ambiguous left joins in MS Access
I want to convert the following query from T-SQL SELECT * FROM A LEFT JOIN B ON A.field1 = B.field1 LEFT JOIN C ON C.field1 = A.field2 AND C.field2 = B.field2 to Jet SQL. Now MS Access does not accept ambiguous queries. How can I do that? I can't put the second comparison in the WHERE clause. Why? Because my scenario is that I am selecting records that does not exist in C. http://stackoverflow.com/questions/2686254/how-to-select-all-records-from-one-table-that-do-not-exist-in-another-table Now, how do you that in MS Access? Thanks in advance for your time and expertise.
sql-server
tsql
ms-access
jet
null
null
open
Ambiguous left joins in MS Access === I want to convert the following query from T-SQL SELECT * FROM A LEFT JOIN B ON A.field1 = B.field1 LEFT JOIN C ON C.field1 = A.field2 AND C.field2 = B.field2 to Jet SQL. Now MS Access does not accept ambiguous queries. How can I do that? I can't put the second comparison in the WHERE clause. Why? Because my scenario is that I am selecting records that does not exist in C. http://stackoverflow.com/questions/2686254/how-to-select-all-records-from-one-table-that-do-not-exist-in-another-table Now, how do you that in MS Access? Thanks in advance for your time and expertise.
0
11,734,578
07/31/2012 06:47:22
1,515,571
07/10/2012 17:22:26
11
0
CURAND Library - Compiling Error - Undefined reference to functions
I have the following code which I am trying to compile using nvcc. Code: #include <stdio.h> #include <stdlib.h> #include <cuda.h> #include <curand.h> int main(void) { size_t n = 100; size_t i; int *hostData; unsigned int *devData; hostData = (int *)calloc(n, sizeof(int)); curandGenerator_t gen; curandCreateGenerator(&gen, CURAND_RNG_PSEUDO_MRG32K3A); curandSetPseudoRandomGeneratorSeed(gen, 12345); cudaMalloc((void **)&devData, n * sizeof(int)); curandGenerate(gen, devData, n); cudaMemcpy(hostData, devData, n * sizeof(int), cudaMemcpyDeviceToHost); for(i = 0; i < n; i++) { printf("%d ", hostData[i]); } printf("\n"); curandDestroyGenerator (gen); cudaFree ( devData ); free ( hostData ); return 0; } This is the output I receive: $ nvcc -o RNG7 RNG7.cu /tmp/tmpxft_00005da4_00000000-13_RNG7.o: In function `main': tmpxft_00005da4_00000000-1_RNG7.cudafe1.cpp:(.text+0x6c): undefined reference to `curandCreateGenerator' tmpxft_00005da4_00000000-1_RNG7.cudafe1.cpp:(.text+0x7a): undefined reference to `curandSetPseudoRandomGeneratorSeed' tmpxft_00005da4_00000000-1_RNG7.cudafe1.cpp:(.text+0xa0): undefined reference to `curandGenerate' tmpxft_00005da4_00000000-1_RNG7.cudafe1.cpp:(.text+0x107): undefined reference to `curandDestroyGenerator' collect2: ld returned 1 exit status My initial guess is that for some reason the CURAND Library is not properly installed or that it cannot find the curand.h header file. Please let me know what I should look for or how to solve my problem. Thanks!
cuda
gpu
gpgpu
prng
null
null
open
CURAND Library - Compiling Error - Undefined reference to functions === I have the following code which I am trying to compile using nvcc. Code: #include <stdio.h> #include <stdlib.h> #include <cuda.h> #include <curand.h> int main(void) { size_t n = 100; size_t i; int *hostData; unsigned int *devData; hostData = (int *)calloc(n, sizeof(int)); curandGenerator_t gen; curandCreateGenerator(&gen, CURAND_RNG_PSEUDO_MRG32K3A); curandSetPseudoRandomGeneratorSeed(gen, 12345); cudaMalloc((void **)&devData, n * sizeof(int)); curandGenerate(gen, devData, n); cudaMemcpy(hostData, devData, n * sizeof(int), cudaMemcpyDeviceToHost); for(i = 0; i < n; i++) { printf("%d ", hostData[i]); } printf("\n"); curandDestroyGenerator (gen); cudaFree ( devData ); free ( hostData ); return 0; } This is the output I receive: $ nvcc -o RNG7 RNG7.cu /tmp/tmpxft_00005da4_00000000-13_RNG7.o: In function `main': tmpxft_00005da4_00000000-1_RNG7.cudafe1.cpp:(.text+0x6c): undefined reference to `curandCreateGenerator' tmpxft_00005da4_00000000-1_RNG7.cudafe1.cpp:(.text+0x7a): undefined reference to `curandSetPseudoRandomGeneratorSeed' tmpxft_00005da4_00000000-1_RNG7.cudafe1.cpp:(.text+0xa0): undefined reference to `curandGenerate' tmpxft_00005da4_00000000-1_RNG7.cudafe1.cpp:(.text+0x107): undefined reference to `curandDestroyGenerator' collect2: ld returned 1 exit status My initial guess is that for some reason the CURAND Library is not properly installed or that it cannot find the curand.h header file. Please let me know what I should look for or how to solve my problem. Thanks!
0
11,734,583
07/31/2012 06:47:36
844,464
03/31/2011 05:47:08
446
24
Why core file is more than virtual memory?
I have a multithreaded program running which crashes after a day or two. Moreover the gdb backtrace of the core dump does not lead anywhere. There are no symbols at the point where it crashes. Now the machine that generates the core file has a physical memory of 3 Gigs and 5 Gigs swap space. But the core dump that we get is around 25 Gigs. Isn't the core dump actually memory dump? Why is the core dump large? And can anyone give me more lead on how to debug in such situation? Note: We are using many third party lib like MySQL, SQLite, NSPR, PCRE, SpiderMonkey etc.
c++
c
multithreading
debugging
coredump
null
open
Why core file is more than virtual memory? === I have a multithreaded program running which crashes after a day or two. Moreover the gdb backtrace of the core dump does not lead anywhere. There are no symbols at the point where it crashes. Now the machine that generates the core file has a physical memory of 3 Gigs and 5 Gigs swap space. But the core dump that we get is around 25 Gigs. Isn't the core dump actually memory dump? Why is the core dump large? And can anyone give me more lead on how to debug in such situation? Note: We are using many third party lib like MySQL, SQLite, NSPR, PCRE, SpiderMonkey etc.
0
11,734,586
07/31/2012 06:47:55
1,090,953
12/10/2011 07:01:40
1
0
Expandable listview child should have impact on all the child on same time
I am having the expandable listview in which child having the same view. MY problem is if i change something in my first same should effect other child also. i am inflating the same view for each child import android.os.Bundle; import android.view.View; import android.view.View.OnClickListener; import android.view.ViewGroup; import android.widget.AbsListView; import android.widget.BaseExpandableListAdapter; import android.widget.EditText; import android.widget.ExpandableListView; import android.widget.ImageView; import android.widget.LinearLayout; import android.app.ExpandableListActivity; import android.graphics.Color; import android.graphics.Typeface; import android.graphics.drawable.Drawable; import android.widget.TextView; public class ExpandableListExample extends ExpandableListActivity { private MyExpandableListAdapter mAdapter; private String[] preguntas; private String[][] respuestas; LinearLayout bg; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); preguntas = getResources().getStringArray(R.array.countries); String[] respuestas1 = getResources().getStringArray(R.array.capitals); respuestas = new String[respuestas1.length][1]; for (int i = 0; i < respuestas1.length; i++) { respuestas[i][0] = respuestas1[i]; } mAdapter = new MyExpandableListAdapter(); setListAdapter(mAdapter); } public class MyExpandableListAdapter extends BaseExpandableListAdapter { public Object getChild(int groupPosition, int childPosition) { return respuestas[groupPosition][childPosition]; } public long getChildId(int groupPosition, int childPosition) { return childPosition; } public int getChildrenCount(int groupPosition) { return respuestas[groupPosition].length; } public TextView getGenericView() { AbsListView.LayoutParams lp = new AbsListView.LayoutParams( ViewGroup.LayoutParams.FILL_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT); TextView textView = new TextView(ExpandableListExample.this); textView.setLayoutParams(lp); textView.setPadding(60, 5, 0, 5); textView.setTextAppearance(getBaseContext(), R.style.TitleText); return textView; } public View getChildView(int groupPosition, int childPosition, boolean isLastChild, View convertView, ViewGroup parent) { View inflatedView = View.inflate(getApplicationContext(), R.layout.forum_updates_positive, null); inflatedView.setPadding(50, 0, 0, 0); bg=(LinearLayout)inflatedView.findViewById(R.id.bg1); EditText edit=(EditText)findViewById(R.id.edit); TextView positive=(TextView)inflatedView.findViewById(R.id.positive); TextView negative=(TextView)inflatedView.findViewById(R.id.negative); positive.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { bg.setBackgroundResource(R.drawable.bg1); } }); negative.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { bg.setBackgroundResource(R.drawable.bg2); } }); return inflatedView; } public Object getGroup(int groupPosition) { return preguntas[groupPosition]; } public int getGroupCount() { return preguntas.length; } public long getGroupId(int groupPosition) { return groupPosition; } public View getGroupView(int groupPosition, boolean isExpanded, View convertView, ViewGroup parent) { TextView textView = getGenericView(); textView.setText(getGroup(groupPosition).toString()); textView.setTextColor(Color.BLACK); textView.setTypeface(null, Typeface.BOLD); textView.setTextSize(18); textView.setBackgroundResource(R.drawable.top); ImageView image=new ImageView(getApplicationContext()); image.setImageResource(R.drawable.icon); return textView; } public boolean isChildSelectable(int groupPosition, int childPosition) { return true; } public boolean hasStableIds() { return true; } } }
android
null
null
null
null
null
open
Expandable listview child should have impact on all the child on same time === I am having the expandable listview in which child having the same view. MY problem is if i change something in my first same should effect other child also. i am inflating the same view for each child import android.os.Bundle; import android.view.View; import android.view.View.OnClickListener; import android.view.ViewGroup; import android.widget.AbsListView; import android.widget.BaseExpandableListAdapter; import android.widget.EditText; import android.widget.ExpandableListView; import android.widget.ImageView; import android.widget.LinearLayout; import android.app.ExpandableListActivity; import android.graphics.Color; import android.graphics.Typeface; import android.graphics.drawable.Drawable; import android.widget.TextView; public class ExpandableListExample extends ExpandableListActivity { private MyExpandableListAdapter mAdapter; private String[] preguntas; private String[][] respuestas; LinearLayout bg; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); preguntas = getResources().getStringArray(R.array.countries); String[] respuestas1 = getResources().getStringArray(R.array.capitals); respuestas = new String[respuestas1.length][1]; for (int i = 0; i < respuestas1.length; i++) { respuestas[i][0] = respuestas1[i]; } mAdapter = new MyExpandableListAdapter(); setListAdapter(mAdapter); } public class MyExpandableListAdapter extends BaseExpandableListAdapter { public Object getChild(int groupPosition, int childPosition) { return respuestas[groupPosition][childPosition]; } public long getChildId(int groupPosition, int childPosition) { return childPosition; } public int getChildrenCount(int groupPosition) { return respuestas[groupPosition].length; } public TextView getGenericView() { AbsListView.LayoutParams lp = new AbsListView.LayoutParams( ViewGroup.LayoutParams.FILL_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT); TextView textView = new TextView(ExpandableListExample.this); textView.setLayoutParams(lp); textView.setPadding(60, 5, 0, 5); textView.setTextAppearance(getBaseContext(), R.style.TitleText); return textView; } public View getChildView(int groupPosition, int childPosition, boolean isLastChild, View convertView, ViewGroup parent) { View inflatedView = View.inflate(getApplicationContext(), R.layout.forum_updates_positive, null); inflatedView.setPadding(50, 0, 0, 0); bg=(LinearLayout)inflatedView.findViewById(R.id.bg1); EditText edit=(EditText)findViewById(R.id.edit); TextView positive=(TextView)inflatedView.findViewById(R.id.positive); TextView negative=(TextView)inflatedView.findViewById(R.id.negative); positive.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { bg.setBackgroundResource(R.drawable.bg1); } }); negative.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { bg.setBackgroundResource(R.drawable.bg2); } }); return inflatedView; } public Object getGroup(int groupPosition) { return preguntas[groupPosition]; } public int getGroupCount() { return preguntas.length; } public long getGroupId(int groupPosition) { return groupPosition; } public View getGroupView(int groupPosition, boolean isExpanded, View convertView, ViewGroup parent) { TextView textView = getGenericView(); textView.setText(getGroup(groupPosition).toString()); textView.setTextColor(Color.BLACK); textView.setTypeface(null, Typeface.BOLD); textView.setTextSize(18); textView.setBackgroundResource(R.drawable.top); ImageView image=new ImageView(getApplicationContext()); image.setImageResource(R.drawable.icon); return textView; } public boolean isChildSelectable(int groupPosition, int childPosition) { return true; } public boolean hasStableIds() { return true; } } }
0
11,734,590
07/31/2012 06:48:01
1,564,886
07/31/2012 06:37:02
1
0
Android in-app Billing sample application is given dialog on real device
I am trying to implement in-app Billing in my android application. I used sample code which is provided by android , and made all modification to use it as a sample application. When i run this application on real device then a dialog is pop up and said " The market billing service on this device does not support subscription at this time". I have market application version 3.7.15.
android
null
null
null
null
null
open
Android in-app Billing sample application is given dialog on real device === I am trying to implement in-app Billing in my android application. I used sample code which is provided by android , and made all modification to use it as a sample application. When i run this application on real device then a dialog is pop up and said " The market billing service on this device does not support subscription at this time". I have market application version 3.7.15.
0
11,734,592
07/31/2012 06:48:03
895,378
08/15/2011 17:44:42
6,369
241
Using a custom stream wrapper as test stub for PHP's http:// stream wrapper
`var_dump($knowledgeableHelp === 'GREATLY APPRECIATED'); // bool(true)` --- I'm writing a custom stream wrapper to use as a stub in unit tests for an HTTP client class that uses the built-in `http://` stream wrapper. Specifically, I need control over the value returned in the `'wrapper_data'` key by calls to `stream_get_meta_data` on streams created by the custom stream wrapper. Unfortunately, the documentation on stream wrappers is woeful and the API seems unintuitive. What method in a custom wrapper controls the the meta `wrapper_data` response? Using the class at the bottom I've only been able to get the following result when I `var_dump(stream_get_meta_data($stream));` on streams created with the custom wrapper ... array(10) { 'wrapper_data' => class CustomHttpStreamWrapper#5 (3) { public $context => resource(13) of type (stream-context) public $position => int(0) public $bodyData => string(14) "test body data" } ... But I need to coax the wrapper into yielding something like the following on meta data retrieval so I can test the client class's parsing of the data returned by the real `http://` stream wrapper ... array(10) { 'wrapper_data' => Array( [0] => HTTP/1.1 200 OK [1] => Content-Length: 438 ) ... Here's the code I have currently for the custom wrapper: class CustomHttpStreamWrapper { public $context; public $position = 0; public $bodyData = 'test body data'; public function stream_open($path, $mode, $options, &$opened_path) { return true; } public function stream_read($count) { $this->position += strlen($this->bodyData); if ($this->position > strlen($this->bodyData)) { return false; } return $this->bodyData; } public function stream_eof() { return $this->position >= strlen($this->bodyData); } public function stream_stat() { return array('wrapper_data' => array('test')); } public function stream_tell() { return $this->position; } }
php
iostream
stream-wrapper
null
null
null
open
Using a custom stream wrapper as test stub for PHP's http:// stream wrapper === `var_dump($knowledgeableHelp === 'GREATLY APPRECIATED'); // bool(true)` --- I'm writing a custom stream wrapper to use as a stub in unit tests for an HTTP client class that uses the built-in `http://` stream wrapper. Specifically, I need control over the value returned in the `'wrapper_data'` key by calls to `stream_get_meta_data` on streams created by the custom stream wrapper. Unfortunately, the documentation on stream wrappers is woeful and the API seems unintuitive. What method in a custom wrapper controls the the meta `wrapper_data` response? Using the class at the bottom I've only been able to get the following result when I `var_dump(stream_get_meta_data($stream));` on streams created with the custom wrapper ... array(10) { 'wrapper_data' => class CustomHttpStreamWrapper#5 (3) { public $context => resource(13) of type (stream-context) public $position => int(0) public $bodyData => string(14) "test body data" } ... But I need to coax the wrapper into yielding something like the following on meta data retrieval so I can test the client class's parsing of the data returned by the real `http://` stream wrapper ... array(10) { 'wrapper_data' => Array( [0] => HTTP/1.1 200 OK [1] => Content-Length: 438 ) ... Here's the code I have currently for the custom wrapper: class CustomHttpStreamWrapper { public $context; public $position = 0; public $bodyData = 'test body data'; public function stream_open($path, $mode, $options, &$opened_path) { return true; } public function stream_read($count) { $this->position += strlen($this->bodyData); if ($this->position > strlen($this->bodyData)) { return false; } return $this->bodyData; } public function stream_eof() { return $this->position >= strlen($this->bodyData); } public function stream_stat() { return array('wrapper_data' => array('test')); } public function stream_tell() { return $this->position; } }
0
11,628,351
07/24/2012 09:53:26
1,248,672
03/04/2012 21:35:08
3
0
(JS) Is there a more efficient way to toggle multiple classes on click than this?
What is a better way to implement this toggle class using JS? What this is doing is simply this: When you click either "Services", "Gallery", or "Customer", it removes the class "hidden" in the div below, and adds the class "hidden" to all other lists within the same div. A live demo of what is happening can be seen here: http://www.cyberbytesdesign.com/WIP2 (it's the main header navigation). Here is the code that I am using (definitely not an efficient way as this is less than half of all the code, but gets the point across). <nav> <ul class="menu-option-set"> <li> <a href="javascript:;" onmouseup=" document.getElementById('services').classList.toggle('hidden'); document.getElementById('gallery').classList.add('hidden'); document.getElementById('customer').classList.add('hidden'); ">Services</a> </li> <li> <a href="javascript:;" onmouseup=" document.getElementById('gallery').classList.toggle('hidden'); document.getElementById('services').classList.add('hidden'); document.getElementById('customer').classList.add('hidden'); ">Gallery</a> </li> <li> <a href="javascript:;" onmouseup=" document.getElementById('gallery').classList.toggle('hidden'); document.getElementById('services').classList.add('hidden'); document.getElementById('customer').classList.add('hidden'); ">Customer</a> </li> </ul> </nav> <div id="header-subnav"> <nav> <ul id="services" class="hidden"> <li <?php echo $bathroom ?>><a href="bathroom">Bathroom</a></li> <li <?php echo $kitchen ?>><a href="index.php">Kitchen</a></li> <li <?php echo $accessibility ?>><a href="index.php">Accessibility</a></li> </ul> <ul id="gallery" class="hidden"> <li <?php echo $photo ?>><a href="gallery.php">Photo Gallery</a></li> <li <?php echo $project ?>><a href="project.php">Project Gallery</a></li> </ul> <ul id="customer" class="hidden"> <li <?php echo $coupons ?>><a href="coupons.php">Coupons</a></li> <li <?php echo $testimonials ?>><a href="testimonials.php">Testimonials</a></li> </ul> <nav> </div> I'm assuming that you have to do something similar to using this somehow, but modified: $('.menu-option-set a').click(function() { // if clicked item is selected then deselect it if ($('#header-subnav').hasClass('hidden')) { $('#header-subnav').removeClass('hidden'); } // otherwise deselect all and select just this one else { $('.menu-option-set a').removeClass('hidden'); $('#header-subnav').addClass('hidden'); } }); Any ideas?
javascript
class
toggle
null
null
null
open
(JS) Is there a more efficient way to toggle multiple classes on click than this? === What is a better way to implement this toggle class using JS? What this is doing is simply this: When you click either "Services", "Gallery", or "Customer", it removes the class "hidden" in the div below, and adds the class "hidden" to all other lists within the same div. A live demo of what is happening can be seen here: http://www.cyberbytesdesign.com/WIP2 (it's the main header navigation). Here is the code that I am using (definitely not an efficient way as this is less than half of all the code, but gets the point across). <nav> <ul class="menu-option-set"> <li> <a href="javascript:;" onmouseup=" document.getElementById('services').classList.toggle('hidden'); document.getElementById('gallery').classList.add('hidden'); document.getElementById('customer').classList.add('hidden'); ">Services</a> </li> <li> <a href="javascript:;" onmouseup=" document.getElementById('gallery').classList.toggle('hidden'); document.getElementById('services').classList.add('hidden'); document.getElementById('customer').classList.add('hidden'); ">Gallery</a> </li> <li> <a href="javascript:;" onmouseup=" document.getElementById('gallery').classList.toggle('hidden'); document.getElementById('services').classList.add('hidden'); document.getElementById('customer').classList.add('hidden'); ">Customer</a> </li> </ul> </nav> <div id="header-subnav"> <nav> <ul id="services" class="hidden"> <li <?php echo $bathroom ?>><a href="bathroom">Bathroom</a></li> <li <?php echo $kitchen ?>><a href="index.php">Kitchen</a></li> <li <?php echo $accessibility ?>><a href="index.php">Accessibility</a></li> </ul> <ul id="gallery" class="hidden"> <li <?php echo $photo ?>><a href="gallery.php">Photo Gallery</a></li> <li <?php echo $project ?>><a href="project.php">Project Gallery</a></li> </ul> <ul id="customer" class="hidden"> <li <?php echo $coupons ?>><a href="coupons.php">Coupons</a></li> <li <?php echo $testimonials ?>><a href="testimonials.php">Testimonials</a></li> </ul> <nav> </div> I'm assuming that you have to do something similar to using this somehow, but modified: $('.menu-option-set a').click(function() { // if clicked item is selected then deselect it if ($('#header-subnav').hasClass('hidden')) { $('#header-subnav').removeClass('hidden'); } // otherwise deselect all and select just this one else { $('.menu-option-set a').removeClass('hidden'); $('#header-subnav').addClass('hidden'); } }); Any ideas?
0
11,628,352
07/24/2012 09:53:28
800,285
06/15/2011 19:29:33
72
13
ETL SSIS : Redirecting error rows to a seperate table
I am working on a package that contains a Source, about 80 lookups and 1 destination. The data in the source table is not consistent enough and hence my package fails very often. Is there a way by which I can transfer all the rows which are giving at the time of inserting them in destination table? For eg. I have 5 rows in Source and out of which 1st and 4th will give error. Now the result should be that 2nd, 3rd and 5th should go in destination but 1st and 4th should be stored in some flat file or a db table. Thanks in advance
sql
ssis
etl
ssis-data-transformations
null
null
open
ETL SSIS : Redirecting error rows to a seperate table === I am working on a package that contains a Source, about 80 lookups and 1 destination. The data in the source table is not consistent enough and hence my package fails very often. Is there a way by which I can transfer all the rows which are giving at the time of inserting them in destination table? For eg. I have 5 rows in Source and out of which 1st and 4th will give error. Now the result should be that 2nd, 3rd and 5th should go in destination but 1st and 4th should be stored in some flat file or a db table. Thanks in advance
0
11,628,353
07/24/2012 09:53:31
392,335
07/15/2010 05:58:20
143
2
How to ignore default values while serializing json with Newtonsoft.Json
I'm using `Newtonsoft.Json.JsonConvert` to serialize a `Textbox` (WinForms) into json and I want the serialization to skip properties with default values or empty arrays. I'v tried to use `NullValueHandling = NullValueHandling.Ignore` in `JsonSerializerSettings` but is doesn't seem to affect anything. Here is the full code sample (simplified): JsonSerializerSettings settings = new JsonSerializerSettings() { Formatting = Formatting.None, DefaultValueHandling = DefaultValueHandling.Ignore, NullValueHandling = NullValueHandling.Ignore, ReferenceLoopHandling = ReferenceLoopHandling.Ignore, ObjectCreationHandling = ObjectCreationHandling.Replace, PreserveReferencesHandling = PreserveReferencesHandling.None, ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, }; TextBox textBox = JsonConvert.DeserializeObject(jsonData, typeof(TextBox), settings) as TextBox; Any ideas ?
c#
json
newtonsoft
null
null
null
open
How to ignore default values while serializing json with Newtonsoft.Json === I'm using `Newtonsoft.Json.JsonConvert` to serialize a `Textbox` (WinForms) into json and I want the serialization to skip properties with default values or empty arrays. I'v tried to use `NullValueHandling = NullValueHandling.Ignore` in `JsonSerializerSettings` but is doesn't seem to affect anything. Here is the full code sample (simplified): JsonSerializerSettings settings = new JsonSerializerSettings() { Formatting = Formatting.None, DefaultValueHandling = DefaultValueHandling.Ignore, NullValueHandling = NullValueHandling.Ignore, ReferenceLoopHandling = ReferenceLoopHandling.Ignore, ObjectCreationHandling = ObjectCreationHandling.Replace, PreserveReferencesHandling = PreserveReferencesHandling.None, ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, }; TextBox textBox = JsonConvert.DeserializeObject(jsonData, typeof(TextBox), settings) as TextBox; Any ideas ?
0
11,628,364
07/24/2012 09:54:06
888,051
08/10/2011 14:07:26
1,681
1
how to block a thread and resume it
Here is what I want to do: there is a main thread producing numbers and put them into a queue, it fires a child thread consuming the numbers in the queue. The main thread should stop producing numbers if the queue's size grows more than 10, and it should resume number production if the queue's size goes down less than 5. queue<int> qu; void *num_consumer(void *arg) { while(1) { //lock qu int num = qu.pop(); //unlock qu do_something_with(num); } } int main() { pthread_create(&tid, NULL, num_consumer, NULL); while(1) { int num; produce(&num); //lock qu queue.push(num); //unlock qu if(qu.size() >= 10) { //how to block and how to resume the main thread? } } } I might use `semaphore` to do the job, but any other idea?
c
multithreading
null
null
null
null
open
how to block a thread and resume it === Here is what I want to do: there is a main thread producing numbers and put them into a queue, it fires a child thread consuming the numbers in the queue. The main thread should stop producing numbers if the queue's size grows more than 10, and it should resume number production if the queue's size goes down less than 5. queue<int> qu; void *num_consumer(void *arg) { while(1) { //lock qu int num = qu.pop(); //unlock qu do_something_with(num); } } int main() { pthread_create(&tid, NULL, num_consumer, NULL); while(1) { int num; produce(&num); //lock qu queue.push(num); //unlock qu if(qu.size() >= 10) { //how to block and how to resume the main thread? } } } I might use `semaphore` to do the job, but any other idea?
0
11,628,365
07/24/2012 09:54:13
1,548,229
07/24/2012 09:40:52
1
0
Django, CRSF Token , POST REQUEST. Works on browser however not on mobile phone
As question is being asked in the header. I'm trying to be more specific here then, pardon my English. I'm currently working on a jquerymobile website with django on openshift. I had a login page which uses ajax and sending post request. I've did something like. var account = '{"Email" : "' + username + '" , "Password" : "' + password + '"}'; $.ajax({ url: "/Account/Login", beforeSend: function(xhr) { xhr.setRequestHeader("X-CSRFToken", '{{ csrf_token }}'); }, type: "POST", data: { "account" : account }, success: function(data) { var obj = eval("(" + data + ")"); if (obj.Status == "100") { if(typeof(Storage)!=="undefined") { sessionStorage.user = username; window.location = "/"; } } else if (obj.Status == "101") { invalid parameters sent. } else if (obj.Status == "102") { email doesnt exist / email & password pair doesn't match. } }, }); Basically the obj.Status is a json reply with Status & Message. username and password are inputs by user. I've also tried by using putting data sent the csrfmiddlewaretoken and it's the same result. So any solutions? By the way I'm testing it on iPhone 4S and Google Chrome. Thanks in advance people :)
ajax
django
csrf
null
null
null
open
Django, CRSF Token , POST REQUEST. Works on browser however not on mobile phone === As question is being asked in the header. I'm trying to be more specific here then, pardon my English. I'm currently working on a jquerymobile website with django on openshift. I had a login page which uses ajax and sending post request. I've did something like. var account = '{"Email" : "' + username + '" , "Password" : "' + password + '"}'; $.ajax({ url: "/Account/Login", beforeSend: function(xhr) { xhr.setRequestHeader("X-CSRFToken", '{{ csrf_token }}'); }, type: "POST", data: { "account" : account }, success: function(data) { var obj = eval("(" + data + ")"); if (obj.Status == "100") { if(typeof(Storage)!=="undefined") { sessionStorage.user = username; window.location = "/"; } } else if (obj.Status == "101") { invalid parameters sent. } else if (obj.Status == "102") { email doesnt exist / email & password pair doesn't match. } }, }); Basically the obj.Status is a json reply with Status & Message. username and password are inputs by user. I've also tried by using putting data sent the csrfmiddlewaretoken and it's the same result. So any solutions? By the way I'm testing it on iPhone 4S and Google Chrome. Thanks in advance people :)
0
11,628,366
07/24/2012 09:54:14
983,223
10/07/2011 00:59:30
139
16
git fetch and clone
I have a computer with my git project (computer A). I then did a git clone of it to work on it on another computer (computer B). I have made some changes on the new computer (A) and did a commit and a push. All seems well. git push Counting objects: 7, done. Delta compression using up to 2 threads. Compressing objects: 100% (4/4), done. Writing objects: 100% (4/4), 539 bytes, done. Total 4 (delta 3), reused 0 (delta 0) To [email protected]:/photos/ 2bf1437..ef7de42 mike -> mike When I go to my original computer (B) and do a git fetch it doesn't fetch anything. Is there something I need to do to tell computer B about computer A?
git
null
null
null
null
null
open
git fetch and clone === I have a computer with my git project (computer A). I then did a git clone of it to work on it on another computer (computer B). I have made some changes on the new computer (A) and did a commit and a push. All seems well. git push Counting objects: 7, done. Delta compression using up to 2 threads. Compressing objects: 100% (4/4), done. Writing objects: 100% (4/4), 539 bytes, done. Total 4 (delta 3), reused 0 (delta 0) To [email protected]:/photos/ 2bf1437..ef7de42 mike -> mike When I go to my original computer (B) and do a git fetch it doesn't fetch anything. Is there something I need to do to tell computer B about computer A?
0
11,628,370
07/24/2012 09:54:18
1,424,964
05/30/2012 01:00:44
26
2
How to create unique html table?
I have problem to create table like image below: ![html table][1] Does anyone know how to create table above using html and css? Please guide me and thanks in advance. [1]: http://i.stack.imgur.com/d6h58.jpg
html
css
null
null
null
null
open
How to create unique html table? === I have problem to create table like image below: ![html table][1] Does anyone know how to create table above using html and css? Please guide me and thanks in advance. [1]: http://i.stack.imgur.com/d6h58.jpg
0
11,628,372
07/24/2012 09:54:24
767,504
05/24/2011 09:55:05
40
0
Using JQuery to select the Last Select Value?
I have the following html code: <div id="casesList1" class="cases"> <select id="casesList"> <option value="1">case1</option> <option value="2">case2</option> <option value="3">case3</option> </select> <div id="casesList2" class="cases"> <select id="casesList"> <option value="4">case4</option> <option value="5">case5</option> </select> </div> </div> and I need to select using JQuery the last value of the select inputs, in the inside div.. For example, if I selected 'case5', the function should return 5, the problem is that I have more than a select input with the id 'casesList'. I tried this: $('#casesList:last option:selected').attr('value'); But it only selects the first select value...
jquery
jquery-selectors
null
null
null
null
open
Using JQuery to select the Last Select Value? === I have the following html code: <div id="casesList1" class="cases"> <select id="casesList"> <option value="1">case1</option> <option value="2">case2</option> <option value="3">case3</option> </select> <div id="casesList2" class="cases"> <select id="casesList"> <option value="4">case4</option> <option value="5">case5</option> </select> </div> </div> and I need to select using JQuery the last value of the select inputs, in the inside div.. For example, if I selected 'case5', the function should return 5, the problem is that I have more than a select input with the id 'casesList'. I tried this: $('#casesList:last option:selected').attr('value'); But it only selects the first select value...
0
11,628,373
07/24/2012 09:54:26
1,425,692
05/30/2012 09:41:50
225
15
Scan multiple barcodes with ZXing
I am currently trying to get ZXing to scan some barcodes. It's doing that job fine so far (via intent). Now I would like to make it decode multiple barcodes at once (they are placed beneath each other) without having to scan each barcode individually. Is this even possible via intent? If not, a short example of how to do it the other way would be appreciated :) I've so far only found a pretty old thread where a user requested this feature and some developers seem to have integrated it. However, I am unable to find any tutorial explaining the utilization. The thread can be found [here](http://code.google.com/p/zxing/issues/detail?id=183).
android
multiple
barcode
zxing
null
null
open
Scan multiple barcodes with ZXing === I am currently trying to get ZXing to scan some barcodes. It's doing that job fine so far (via intent). Now I would like to make it decode multiple barcodes at once (they are placed beneath each other) without having to scan each barcode individually. Is this even possible via intent? If not, a short example of how to do it the other way would be appreciated :) I've so far only found a pretty old thread where a user requested this feature and some developers seem to have integrated it. However, I am unable to find any tutorial explaining the utilization. The thread can be found [here](http://code.google.com/p/zxing/issues/detail?id=183).
0
11,628,157
07/24/2012 09:42:11
1,166,931
01/24/2012 12:03:03
68
0
android spinner first element list
I have the following code: spin.setAdapter(new ArrayAdapter<String>( Activity.this, android.R.layout.simple_spinner_item, result)); spin.setOnItemSelectedListener(new OnItemSelectedListener() { String selected; boolean click=false; int currSelection =spin.getLastVisiblePosition(); public void onItemSelected( AdapterView<?> parentView, View selectedItemView, int position, long id) { if ((position != 0)){ //code here } } When clicking on the first element from the list I can't retrive the value. All the rest of the list elements work as expected. I know that the issue is that int value possition. The problem is that if i don't have that if condition then every type i start the list the first element pops up even if i haven t clicnk on any item of the lict. How to solve this?
android
spinner
null
null
null
null
open
android spinner first element list === I have the following code: spin.setAdapter(new ArrayAdapter<String>( Activity.this, android.R.layout.simple_spinner_item, result)); spin.setOnItemSelectedListener(new OnItemSelectedListener() { String selected; boolean click=false; int currSelection =spin.getLastVisiblePosition(); public void onItemSelected( AdapterView<?> parentView, View selectedItemView, int position, long id) { if ((position != 0)){ //code here } } When clicking on the first element from the list I can't retrive the value. All the rest of the list elements work as expected. I know that the issue is that int value possition. The problem is that if i don't have that if condition then every type i start the list the first element pops up even if i haven t clicnk on any item of the lict. How to solve this?
0
11,373,365
07/07/2012 08:00:06
1,314,363
04/05/2012 04:39:52
3
0
PRISM + MEF: usercontrol or page?
For WPF Prism + MEF, most samples use usercontrol, is there any issue NOT to use page instead?
wpf
xaml
prism
null
null
null
open
PRISM + MEF: usercontrol or page? === For WPF Prism + MEF, most samples use usercontrol, is there any issue NOT to use page instead?
0
11,373,369
07/07/2012 08:01:06
1,179,493
01/31/2012 04:20:56
60
0
Offline Google Maps in an Android app
Recently Google released a new version of their Google Maps which lets you save an offline version of a particular chunk of the map. At the same time I've been playing around with making an Android app which uses the Google Maps API, and I was just wondering... is it possible in some way to get that offline map and get my application to use it? So that my application doesn't need an internet connection either? I'm aware that OpenStreetMap is an alternative but I don't think it'll work with the project I have in mind. Cheers
google-maps
null
null
null
null
null
open
Offline Google Maps in an Android app === Recently Google released a new version of their Google Maps which lets you save an offline version of a particular chunk of the map. At the same time I've been playing around with making an Android app which uses the Google Maps API, and I was just wondering... is it possible in some way to get that offline map and get my application to use it? So that my application doesn't need an internet connection either? I'm aware that OpenStreetMap is an alternative but I don't think it'll work with the project I have in mind. Cheers
0
11,373,370
07/07/2012 08:01:13
1,090,608
12/09/2011 22:46:46
1
0
Eclipse-generated method parameters having unreasonable names
I am sometimes running in the problem that when I use the Eclipse function to add/generate methods of an interface which I want to implement the parameter names of these methods are just "too generic". So, if it is a String parameter it is named paramString, if it is a int it is called paramInt and so forth - instead of being called something that expresses the parameters' semantics. For instance, I am currently implementing the javax.portlet.PortletSession interface (part of the JSR 286 spec.; I need a custom implementation). Methods carry parameters like these: public void setAttribute(String paramString, Object paramObject) public void setAttribute(String paramString, Object paramObject, int paramInt) What I would like to have is sth like this: public void setAttribute(String key, Object value) public void setAttribute(String key, Object value, int scope) Sometimes the generation of methods works the way I want, sometimes, just as this time, it doesn't. I assume this has to do with the way I import the library holding the interface I want to implement, but maybe someone can explain the behavior in a bit more detail? Maybe someone can give an explaination along a concrete example: How would I have to import the JSR 286 spec, how to generate the methods to get what I want? Thank you so much!
java
eclipse
methods
parameters
naming
null
open
Eclipse-generated method parameters having unreasonable names === I am sometimes running in the problem that when I use the Eclipse function to add/generate methods of an interface which I want to implement the parameter names of these methods are just "too generic". So, if it is a String parameter it is named paramString, if it is a int it is called paramInt and so forth - instead of being called something that expresses the parameters' semantics. For instance, I am currently implementing the javax.portlet.PortletSession interface (part of the JSR 286 spec.; I need a custom implementation). Methods carry parameters like these: public void setAttribute(String paramString, Object paramObject) public void setAttribute(String paramString, Object paramObject, int paramInt) What I would like to have is sth like this: public void setAttribute(String key, Object value) public void setAttribute(String key, Object value, int scope) Sometimes the generation of methods works the way I want, sometimes, just as this time, it doesn't. I assume this has to do with the way I import the library holding the interface I want to implement, but maybe someone can explain the behavior in a bit more detail? Maybe someone can give an explaination along a concrete example: How would I have to import the JSR 286 spec, how to generate the methods to get what I want? Thank you so much!
0
11,373,373
07/07/2012 08:01:58
1,190,317
02/05/2012 07:19:21
88
3
how to package install version of dotnetnuke from source of it
I changed source of DotNetnuke (a little!) and I want to package an install version of my new DotNetNuke. How Can I do this? p.s: I know It's not recommended to change the source but I have no another option (Telerik calendar do not support my date format and I have to replace it with another calendar !) Thanks in advance
calendar
dotnetnuke
null
null
null
null
open
how to package install version of dotnetnuke from source of it === I changed source of DotNetnuke (a little!) and I want to package an install version of my new DotNetNuke. How Can I do this? p.s: I know It's not recommended to change the source but I have no another option (Telerik calendar do not support my date format and I have to replace it with another calendar !) Thanks in advance
0
11,373,374
07/07/2012 08:02:00
1,508,398
07/07/2012 07:22:58
1
0
Is it possible to pokeback using Facebook Graph API?
I am building a windows phone 7 app for facebook, using the [Facbook C# SDK][1]. I have been able to get all the pokes for the current user, however I am not abe to figure out, whether i can **pokeback** a friend of current user. I have searched the [GraphAPI][2] documentation, but to no avail. My question is similar to [this][3], but I want help regarding the [pokeback][4] part of the answer. I tried to POST: **userid/pokes**, as mentioned in that answer, but it threw the error { error: { type: "OAuthException", message: "(#3) Application does not have the capability to make this API call.", } } Also, what is Whitelisting of an app in facebook?, in this context. [1]: http://csharpsdk.org/ [2]: https://developers.facebook.com/docs/reference/api/ [3]: http://stackoverflow.com/questions/6505417/facebook-fql-graph-get-all-current-pokes [4]: http://stackoverflow.com/a/6643057/1508398
facebook
facebook-graph-api
facebook-c#-sdk
windows-phone-7.1
null
null
open
Is it possible to pokeback using Facebook Graph API? === I am building a windows phone 7 app for facebook, using the [Facbook C# SDK][1]. I have been able to get all the pokes for the current user, however I am not abe to figure out, whether i can **pokeback** a friend of current user. I have searched the [GraphAPI][2] documentation, but to no avail. My question is similar to [this][3], but I want help regarding the [pokeback][4] part of the answer. I tried to POST: **userid/pokes**, as mentioned in that answer, but it threw the error { error: { type: "OAuthException", message: "(#3) Application does not have the capability to make this API call.", } } Also, what is Whitelisting of an app in facebook?, in this context. [1]: http://csharpsdk.org/ [2]: https://developers.facebook.com/docs/reference/api/ [3]: http://stackoverflow.com/questions/6505417/facebook-fql-graph-get-all-current-pokes [4]: http://stackoverflow.com/a/6643057/1508398
0
11,373,376
07/07/2012 08:02:01
936,370
09/09/2011 08:08:21
8
0
Robots.txt for multiple domains
We have different domains for each language 1. www.abc.com 2. www.abc.se 3. www.abc.de And then we have different sitemap.xml for each site. In robots.txt, I want to add sitemap erefernce for each domain. 1. Is it possible to have multiple sitemap references for each domain in single robots.txt? 2. If there are multiple, which one does it pick?
seo
null
null
null
null
null
open
Robots.txt for multiple domains === We have different domains for each language 1. www.abc.com 2. www.abc.se 3. www.abc.de And then we have different sitemap.xml for each site. In robots.txt, I want to add sitemap erefernce for each domain. 1. Is it possible to have multiple sitemap references for each domain in single robots.txt? 2. If there are multiple, which one does it pick?
0
11,373,377
07/07/2012 08:02:29
1,298,059
03/28/2012 11:43:02
65
10
how to use replace function with in clause in mysql
I want sql query which gives output as concat string **Sql Query** SELECT GROUP_CONCAT(nm) FROM xyz WHERE xyz.id IN (REPLACE(abc,"|",',')) where abc is string like 1|2|3|4 which is ids of xyz table above query only gives nm of 1st id in abc.I thing it creates query like SELECT GROUP_CONCAT(nm) FROM xyz WHERE xyz.id IN ("1,2,3,4") so (") may creates problem anyone can help.
mysql
sql
null
null
null
null
open
how to use replace function with in clause in mysql === I want sql query which gives output as concat string **Sql Query** SELECT GROUP_CONCAT(nm) FROM xyz WHERE xyz.id IN (REPLACE(abc,"|",',')) where abc is string like 1|2|3|4 which is ids of xyz table above query only gives nm of 1st id in abc.I thing it creates query like SELECT GROUP_CONCAT(nm) FROM xyz WHERE xyz.id IN ("1,2,3,4") so (") may creates problem anyone can help.
0
11,373,380
07/07/2012 08:03:22
956,424
09/21/2011 07:58:24
112
8
How to disable copy/paste from a file preview in plone 4.1?
I have registered javascript under portal_javascript using the answer 1 from http://stackoverflow.com/questions/9958478/how-to-disable-copy-paste-browser As stated in the solution ,this will disable selection on the document, but with ctrl+A we can get the contents of the file preview (atreal.richfile.preview add-on) and by using ctrl+c and ctrl+v, yet copy the contents of the previewed file i.e. pdf/ xls/doc . All I want to do is avoid copying of any sort. How can this be achieved?
javascript
python
plone
null
null
null
open
How to disable copy/paste from a file preview in plone 4.1? === I have registered javascript under portal_javascript using the answer 1 from http://stackoverflow.com/questions/9958478/how-to-disable-copy-paste-browser As stated in the solution ,this will disable selection on the document, but with ctrl+A we can get the contents of the file preview (atreal.richfile.preview add-on) and by using ctrl+c and ctrl+v, yet copy the contents of the previewed file i.e. pdf/ xls/doc . All I want to do is avoid copying of any sort. How can this be achieved?
0
11,373,385
07/07/2012 08:04:19
1,468,207
06/20/2012 05:42:52
6
0
I want to move sprite body when touch point detect
I want to move sprite body when i touch screen but it cant happen... -(void)ccTouchEnded:(UITouch *)touch withEvent:(UIEvent *)event { for(b2Body *b=world->GetBodyList();b;b=b->GetNext()) { CGPoint location=[touch locationInView:[touch view]]; location=[[CCDirector sharedDirector]convertToGL:location]; b2Vec2 locationWorld = b2Vec2(location.x/PTM_RATIO, location.y/PTM_RATIO); if(b->GetUserData()!=NULL) { CCSprite *sprite =(CCSprite *)b->GetUserData(); b->SetTransform(b2Vec2(location.x, location.y), 0); id action = [CCMoveTo actionWithDuration:0.4 position:CGPointMake( b->GetPosition().x * PTM_RATIO, b->GetPosition().y * PTM_RATIO)]; [sprite runAction:action]; } } } please help me... thanks
iphone
null
null
null
null
null
open
I want to move sprite body when touch point detect === I want to move sprite body when i touch screen but it cant happen... -(void)ccTouchEnded:(UITouch *)touch withEvent:(UIEvent *)event { for(b2Body *b=world->GetBodyList();b;b=b->GetNext()) { CGPoint location=[touch locationInView:[touch view]]; location=[[CCDirector sharedDirector]convertToGL:location]; b2Vec2 locationWorld = b2Vec2(location.x/PTM_RATIO, location.y/PTM_RATIO); if(b->GetUserData()!=NULL) { CCSprite *sprite =(CCSprite *)b->GetUserData(); b->SetTransform(b2Vec2(location.x, location.y), 0); id action = [CCMoveTo actionWithDuration:0.4 position:CGPointMake( b->GetPosition().x * PTM_RATIO, b->GetPosition().y * PTM_RATIO)]; [sprite runAction:action]; } } } please help me... thanks
0
11,373,390
07/07/2012 08:04:54
1,417,177
05/25/2012 10:34:22
17
1
Button ClickLIstener is not Working in LibGdx game?
I am developing android game using libgdx in that game,there are 4 button in menu screen, but click listener of these button is not working any one suggest me? // retrieve the custom skin for our 2D widgets Skin skin = super.getSkin(); // create the table actor and add it to the stage table = new Table( skin ); table.width = stage.width(); table.height = stage.height(); stage.addActor( table ); // retrieve the table's layout TableLayout layout = table.getTableLayout(); // register the button "start game" TextButton startGameButton = new TextButton( "Start game", skin ); startGameButton.setClickListener( new ClickListener() { @Override public void click(Actor actor,float x,float y ) { System.out.println("hiii"); Assets.load(); //game.getSoundManager().play( TyrianSound.CLICK ); game.setScreen( new GameScreen(game) ); } } ); layout.register( "startGameButton", startGameButton ); please anyone guide me how hndle clicklistener of button in libgdx.Not Image button its layout button.
android
libgdx
null
null
null
null
open
Button ClickLIstener is not Working in LibGdx game? === I am developing android game using libgdx in that game,there are 4 button in menu screen, but click listener of these button is not working any one suggest me? // retrieve the custom skin for our 2D widgets Skin skin = super.getSkin(); // create the table actor and add it to the stage table = new Table( skin ); table.width = stage.width(); table.height = stage.height(); stage.addActor( table ); // retrieve the table's layout TableLayout layout = table.getTableLayout(); // register the button "start game" TextButton startGameButton = new TextButton( "Start game", skin ); startGameButton.setClickListener( new ClickListener() { @Override public void click(Actor actor,float x,float y ) { System.out.println("hiii"); Assets.load(); //game.getSoundManager().play( TyrianSound.CLICK ); game.setScreen( new GameScreen(game) ); } } ); layout.register( "startGameButton", startGameButton ); please anyone guide me how hndle clicklistener of button in libgdx.Not Image button its layout button.
0
11,408,240
07/10/2012 07:06:57
1,182,192
02/01/2012 08:06:17
180
20
How to extract the Signer Info from the Authenticode of a digitally signed PE File encoded using ASN1?
I need to extract the `SignerInfo` from the `Authenticode` of a digitally signed PE File in ASN1 structure. `INFO`: A PE File contains the authenticode at the offset specified by `Security Directory RVA` inside `Optional Header Data Directories`. I have tried to start after reading the document available at [Microsoft Authenticode PE Signature Format][1] but no luck as I am very new to SSL/TSL. **My Question:** 1. Is there a way to parse through the binaries and print the data structure in C String Format? 2. Is there any way in which I can parse through the given binaries and point to the `SignerInfo` or `SignerName` ? `NOTE`: I do not want to use any platform dependent APIs as I want the code to be platform-independent. Thanks in Advance to all Gurus :-) [1]: http://msdn.microsoft.com/en-us/library/windows/hardware/gg463180.aspx
c
x509certificate
x509
asn.1
authenticode
null
open
How to extract the Signer Info from the Authenticode of a digitally signed PE File encoded using ASN1? === I need to extract the `SignerInfo` from the `Authenticode` of a digitally signed PE File in ASN1 structure. `INFO`: A PE File contains the authenticode at the offset specified by `Security Directory RVA` inside `Optional Header Data Directories`. I have tried to start after reading the document available at [Microsoft Authenticode PE Signature Format][1] but no luck as I am very new to SSL/TSL. **My Question:** 1. Is there a way to parse through the binaries and print the data structure in C String Format? 2. Is there any way in which I can parse through the given binaries and point to the `SignerInfo` or `SignerName` ? `NOTE`: I do not want to use any platform dependent APIs as I want the code to be platform-independent. Thanks in Advance to all Gurus :-) [1]: http://msdn.microsoft.com/en-us/library/windows/hardware/gg463180.aspx
0
11,410,611
07/10/2012 09:44:43
5,343
09/09/2008 09:57:56
3,907
132
Get Jekyll Configuration Inside AssetFilter
I'd like to make changes to the Jekyll [Only First Paragraph plugin][1] to make the generation of a 'read more ' link a configurable option. To do this I'd need to be able to access the Jekyll site config inside the plugin's `AssetFilter`. With the configuration available I can make the change. I don't know how to make the site configuration available to the plugin. The code below demonstrates where I'd like `site.config` available: require 'nokogiri' module Jekyll module AssetFilter def only_first_p(post) # site.config needs to be available here to modify the output based on the configuration output = "<p>" output << Nokogiri::HTML(post["content"]).at_css("p").inner_html output << %{</p><a class="readmore" href="#{post["url"]}">Read more</a>} output end end end Liquid::Template.register_filter(Jekyll::AssetFilter) <br /> Can this be achieved? [1]: https://github.com/sebcioz/jekyll-only_first_p
ruby
jekyll
liquid
null
null
null
open
Get Jekyll Configuration Inside AssetFilter === I'd like to make changes to the Jekyll [Only First Paragraph plugin][1] to make the generation of a 'read more ' link a configurable option. To do this I'd need to be able to access the Jekyll site config inside the plugin's `AssetFilter`. With the configuration available I can make the change. I don't know how to make the site configuration available to the plugin. The code below demonstrates where I'd like `site.config` available: require 'nokogiri' module Jekyll module AssetFilter def only_first_p(post) # site.config needs to be available here to modify the output based on the configuration output = "<p>" output << Nokogiri::HTML(post["content"]).at_css("p").inner_html output << %{</p><a class="readmore" href="#{post["url"]}">Read more</a>} output end end end Liquid::Template.register_filter(Jekyll::AssetFilter) <br /> Can this be achieved? [1]: https://github.com/sebcioz/jekyll-only_first_p
0
11,410,613
07/10/2012 09:44:57
1,433,519
06/03/2012 12:35:18
26
0
TreeView SelectedNodeChanged event dosen't trigger asp.net C#
I have a TreeView control in my ASP.NET web application, and I have problems with the event selected node changed, I Click on some node in the treeview but the event dosen't trigger, I have some instructions there that are not executed, I checked with debugger olso.
c#
asp.net
events
triggers
treeview
null
open
TreeView SelectedNodeChanged event dosen't trigger asp.net C# === I have a TreeView control in my ASP.NET web application, and I have problems with the event selected node changed, I Click on some node in the treeview but the event dosen't trigger, I have some instructions there that are not executed, I checked with debugger olso.
0
11,410,888
07/10/2012 10:01:56
615,777
02/03/2011 13:58:17
19
0
Eclipse Install New Software Not Working
I just downloaded the latest version of eclipse classic from eclipse.org and i am trying to install ADK (Android Developer Kit) and i am told to download org.eclipse.wst.xml.core 0.0.0. to download this i found i had to to go install new software and add the repository http://download.eclipse.org/releases/juno/ and download the wst.xml.core plugin from there however all i get is pending. Its been like this for half an hour, i am only have issues with the eclipse repositorys. Any ideas on how to fix this?
android
eclipse
null
null
null
null
open
Eclipse Install New Software Not Working === I just downloaded the latest version of eclipse classic from eclipse.org and i am trying to install ADK (Android Developer Kit) and i am told to download org.eclipse.wst.xml.core 0.0.0. to download this i found i had to to go install new software and add the repository http://download.eclipse.org/releases/juno/ and download the wst.xml.core plugin from there however all i get is pending. Its been like this for half an hour, i am only have issues with the eclipse repositorys. Any ideas on how to fix this?
0
11,410,889
07/10/2012 10:01:58
1,479,493
06/25/2012 09:11:40
10
0
what does $json->SearchResponse->Errors mean in this code?
$body = file_get_contents($url); //defined somewhere else $json = json_decode($body); if(isset($json->SearchResponse->Errors)) throw new Exception ("search Error"); what does $jon->SearchResponse->Errors refer to? I mean does this look in to the contents of body (or) searchresponse and errors are objects..?
php
web-crawler
crawl
null
null
null
open
what does $json->SearchResponse->Errors mean in this code? === $body = file_get_contents($url); //defined somewhere else $json = json_decode($body); if(isset($json->SearchResponse->Errors)) throw new Exception ("search Error"); what does $jon->SearchResponse->Errors refer to? I mean does this look in to the contents of body (or) searchresponse and errors are objects..?
0
11,410,892
07/10/2012 10:02:08
1,514,348
07/10/2012 09:37:22
1
0
How can i make queries for this Cassandra data model design
I got a doubt while designing **data model in cassandra**. <br /> <br /> i.e. I have created this CF <br /> **Page-Followers{ "page-id" : { "user-id" : "time" } }** <br /> I want to make 2 queries on the above CF. <br /> **1)** To **get all user-ids** (as an array using **multiget** function of **phpcassa**) who are following a particular page.<br /> **2)** To chech whether a particular user is following a particular page or not.<br /> i.e. An user with user-id = 1111 is following a page page-id=100 or not. <br /> So, how can i make those queries based on that CF.<br /> **Note :** I don't want to create a new CF for this situation.Because for this user action(i.e. user clicks on follow button on a page), have to insert data in 3 CFs and if i created another CF for this, then have to insert data into total 4 CF. It may cause performance issue.<br /> If you give **example in phpcassa**, then it would be great...<br /><br /> <br /> **Another doubts** is:- <br />As I have created cassandra data model for my college social netwoeking site(i.e. page-followers, user-followers, notifications, Alerts,...etc). <br />For each user action, i have to insert data into 2 or 3 or more CFs, So Is it cause for performance issue??? Is it a good design??<br /> <br />Please help me...<br /> <br />Thanks in advance
cassandra
phpcassa
data-model
null
null
null
open
How can i make queries for this Cassandra data model design === I got a doubt while designing **data model in cassandra**. <br /> <br /> i.e. I have created this CF <br /> **Page-Followers{ "page-id" : { "user-id" : "time" } }** <br /> I want to make 2 queries on the above CF. <br /> **1)** To **get all user-ids** (as an array using **multiget** function of **phpcassa**) who are following a particular page.<br /> **2)** To chech whether a particular user is following a particular page or not.<br /> i.e. An user with user-id = 1111 is following a page page-id=100 or not. <br /> So, how can i make those queries based on that CF.<br /> **Note :** I don't want to create a new CF for this situation.Because for this user action(i.e. user clicks on follow button on a page), have to insert data in 3 CFs and if i created another CF for this, then have to insert data into total 4 CF. It may cause performance issue.<br /> If you give **example in phpcassa**, then it would be great...<br /><br /> <br /> **Another doubts** is:- <br />As I have created cassandra data model for my college social netwoeking site(i.e. page-followers, user-followers, notifications, Alerts,...etc). <br />For each user action, i have to insert data into 2 or 3 or more CFs, So Is it cause for performance issue??? Is it a good design??<br /> <br />Please help me...<br /> <br />Thanks in advance
0
11,410,623
07/10/2012 09:45:36
858,565
07/22/2011 19:36:33
115
6
Peculiar behavior of array_udiff?
I've got the following Php script: <?php function filt($k, $l){ if($k===$l){ var_dump("valid: ".$k."-".$l); return 0; } return 1; } $a6=array(7, 9, 3, 33); $a7=array(2, 9, 3, 33); $u=array_udiff($a6, $a7, "filt"); var_dump($u); ?> With the following output: string 'valid: 3-3' (length=10) array 0 => int 7 1 => int 9 3 => int 33 As I know, the array_udiff should dump the equal values and let only the different values from the first array. What seems to be the problem here? I run WampServer Version 2.2 on Windows 7. Php version: 5.3.9.
php
arrays
null
null
null
null
open
Peculiar behavior of array_udiff? === I've got the following Php script: <?php function filt($k, $l){ if($k===$l){ var_dump("valid: ".$k."-".$l); return 0; } return 1; } $a6=array(7, 9, 3, 33); $a7=array(2, 9, 3, 33); $u=array_udiff($a6, $a7, "filt"); var_dump($u); ?> With the following output: string 'valid: 3-3' (length=10) array 0 => int 7 1 => int 9 3 => int 33 As I know, the array_udiff should dump the equal values and let only the different values from the first array. What seems to be the problem here? I run WampServer Version 2.2 on Windows 7. Php version: 5.3.9.
0
11,410,893
07/10/2012 10:02:11
357,261
06/03/2010 08:59:33
997
0
Why iis host application do not let log in?
I have hosted my applciation to the IIS -7 and it browses proper but it doest let me log in now, desipte i have checked it has a correct connection string, it throws error at my log page SqlParameter[] arrParams = new SqlParameter[0]; Line 97: _userDetails = Data.GetSQLQueryResults(sqlQuery, 0, arrParams); Line 98: if (_userDetails.Rows.Count != 0) Line 99: { Line 100: _userAccountID = _userDetails.Rows[0]["UserAccountID"].ToString(); d:\Projects\June 20\CorrDefensev2\App_Code\UserInfo.cs Line: 98
c#
asp.net
iis
null
null
null
open
Why iis host application do not let log in? === I have hosted my applciation to the IIS -7 and it browses proper but it doest let me log in now, desipte i have checked it has a correct connection string, it throws error at my log page SqlParameter[] arrParams = new SqlParameter[0]; Line 97: _userDetails = Data.GetSQLQueryResults(sqlQuery, 0, arrParams); Line 98: if (_userDetails.Rows.Count != 0) Line 99: { Line 100: _userAccountID = _userDetails.Rows[0]["UserAccountID"].ToString(); d:\Projects\June 20\CorrDefensev2\App_Code\UserInfo.cs Line: 98
0
11,410,899
07/10/2012 10:02:32
1,286,157
03/22/2012 14:17:05
10
3
Making your C# application Default application during instalation
I created an MP3 music player, created its set up file using visual Studio Installer(Setup Project), but need help to make it the default player for windows, not manually but with code, or using the Setup project, can anyone help please
c#
.net
null
null
null
null
open
Making your C# application Default application during instalation === I created an MP3 music player, created its set up file using visual Studio Installer(Setup Project), but need help to make it the default player for windows, not manually but with code, or using the Setup project, can anyone help please
0
11,659,991
07/25/2012 23:07:49
493,122
11/01/2010 01:16:20
3,812
149
Too many arguments, too few arguments in function pointer
I'm trying to learn c++ from the basics, and I was playing around with function pointers. Considering this code: #include <iostream> #include <string> #include <vector> bool print(std::string); bool print(std::string a) { std::cout << a << std::endl; return true; } bool call_user_function(bool(std::string), std::vector<std::string>); bool call_user_function(bool(*p)(std::string), std::vector<std::string> args) { if (args.size() == 0) return (*p)(); (*) else if (args.size() == 1) return (*p)(args[0]); else if (args.size() == 2) return (*p)(args[0], args[1]); (**) } int main(int argc, char** argv) { std::vector<std::string> a; a[0] = "test"; call_user_function(print, a); // ok return 0; } It gives me: > main.cpp:28 (*): error: too few arguments to function > main.cpp:32 (**): error: too many arguments to function What am I doing wrong?
c++
function-pointers
null
null
null
null
open
Too many arguments, too few arguments in function pointer === I'm trying to learn c++ from the basics, and I was playing around with function pointers. Considering this code: #include <iostream> #include <string> #include <vector> bool print(std::string); bool print(std::string a) { std::cout << a << std::endl; return true; } bool call_user_function(bool(std::string), std::vector<std::string>); bool call_user_function(bool(*p)(std::string), std::vector<std::string> args) { if (args.size() == 0) return (*p)(); (*) else if (args.size() == 1) return (*p)(args[0]); else if (args.size() == 2) return (*p)(args[0], args[1]); (**) } int main(int argc, char** argv) { std::vector<std::string> a; a[0] = "test"; call_user_function(print, a); // ok return 0; } It gives me: > main.cpp:28 (*): error: too few arguments to function > main.cpp:32 (**): error: too many arguments to function What am I doing wrong?
0
11,659,992
07/25/2012 23:07:56
1,536,593
07/19/2012 02:31:37
3
0
Wordpress Page Gallery
I am attempting to have a Gallery of wordpress pages. The code should get all of the child pages of a certain page, and return the results with the Thumbnail of the page and the name of it. The thumbnail needs to be a clickable link. I have gotten to this point, and am stuck: <?php $pages = get_pages(array('child_of' => 8)); ?> <?php foreach ($pages as $page): ?> <h1><?php echo $page['post_title'] ?></h1> <a href="<?php echo $page['guid'] ?>"><img src="" /></a> <?php endforeach; ?>
php
wordpress
null
null
null
null
open
Wordpress Page Gallery === I am attempting to have a Gallery of wordpress pages. The code should get all of the child pages of a certain page, and return the results with the Thumbnail of the page and the name of it. The thumbnail needs to be a clickable link. I have gotten to this point, and am stuck: <?php $pages = get_pages(array('child_of' => 8)); ?> <?php foreach ($pages as $page): ?> <h1><?php echo $page['post_title'] ?></h1> <a href="<?php echo $page['guid'] ?>"><img src="" /></a> <?php endforeach; ?>
0
11,659,911
07/25/2012 22:59:20
1,088,843
12/09/2011 00:47:57
43
2
form hidden field paypal - simple
ok, so i have a form with several fields; company name, description, etc. when thats filled in you click 'Preview', that takes you to the preview page to see what your profile will look like, if you're happy with that you click 'buy now' which takes you to the paypal page, you pay, (IPN sent to my/ipn.php page) and then go back to my site/success.php which just says "success blah blah etc" my question is; how do i retrieve all that form data in my ipn.php page? you can do it with Sessions, but im sure there's a way with hidden fields, its just that the paypal paying page gets in the way thanks
php
forms
hidden-field
null
null
null
open
form hidden field paypal - simple === ok, so i have a form with several fields; company name, description, etc. when thats filled in you click 'Preview', that takes you to the preview page to see what your profile will look like, if you're happy with that you click 'buy now' which takes you to the paypal page, you pay, (IPN sent to my/ipn.php page) and then go back to my site/success.php which just says "success blah blah etc" my question is; how do i retrieve all that form data in my ipn.php page? you can do it with Sessions, but im sure there's a way with hidden fields, its just that the paypal paying page gets in the way thanks
0
11,659,912
07/25/2012 22:59:21
994,284
10/13/2011 20:16:28
32
1
PHP Class is printed as plain text
I am using a Pagination class that I found on Codecanyon that works wonders on a virtual host ( XAMPP ). I just uploaded it to the server the site is for, and almost the whole class is rendered as plain text where it's included, instead of being used, so to speak. The whole site is PHP based, and works perfectly, but this little class is simply printed as text. I really can't figure out why, and I am in desperate need to find a solution to this as quickly as possible. Here are the first plain text that is shown from the class; phrase=array(); $this->setCurrentPage($currentPage); $this->setTotalResults($totalResults); $this->setResultsPerPage($resultsPerPage); $this->setLanguage($language); .. and on it goes to the end of the class file. This is the first lines in the class' constructor ( and the $this-> key is omitted in the plain text.. (?). Here is the first lines of the constructor itself; function __construct($currentPage,$totalResults,$resultsPerPage=25,$language='en',$pathToLanguageFile='../language/') { $this->phrase=array(); $this->setCurrentPage($currentPage); $this->setTotalResults($totalResults); Here is a link to the class posted by the author on codecanyon; http://codecanyon.net/item/scrolling-pagination-class/113230 I'm sure it's some server setting that does this, but which/where/why? (I'm not posting the whole pagination class, since it has been bought, and the license obstructs me from doing this, although I can't imagine it's the class' fault) I would be immensely appreciative for any help and/or pointers. Thank you.
php
pagination
null
null
null
null
open
PHP Class is printed as plain text === I am using a Pagination class that I found on Codecanyon that works wonders on a virtual host ( XAMPP ). I just uploaded it to the server the site is for, and almost the whole class is rendered as plain text where it's included, instead of being used, so to speak. The whole site is PHP based, and works perfectly, but this little class is simply printed as text. I really can't figure out why, and I am in desperate need to find a solution to this as quickly as possible. Here are the first plain text that is shown from the class; phrase=array(); $this->setCurrentPage($currentPage); $this->setTotalResults($totalResults); $this->setResultsPerPage($resultsPerPage); $this->setLanguage($language); .. and on it goes to the end of the class file. This is the first lines in the class' constructor ( and the $this-> key is omitted in the plain text.. (?). Here is the first lines of the constructor itself; function __construct($currentPage,$totalResults,$resultsPerPage=25,$language='en',$pathToLanguageFile='../language/') { $this->phrase=array(); $this->setCurrentPage($currentPage); $this->setTotalResults($totalResults); Here is a link to the class posted by the author on codecanyon; http://codecanyon.net/item/scrolling-pagination-class/113230 I'm sure it's some server setting that does this, but which/where/why? (I'm not posting the whole pagination class, since it has been bought, and the license obstructs me from doing this, although I can't imagine it's the class' fault) I would be immensely appreciative for any help and/or pointers. Thank you.
0
11,659,993
07/25/2012 23:08:03
557,358
12/29/2010 16:37:38
321
10
CSS/HTML - Issues with Internet Explorer 8 (border-radius, image cover, and padding)
I am having issues viewing my site in Internet Explorer. In the following CSS/HTML the image is supposed to be outlined, curved radius, and scaled to fit. However IE 8 does not scale the image, curve the corners, nor does the outline appear. Here is the jsfiddle: http://jsfiddle.net/pave4/ This page is fine in the newest IE (IE8), however I need to make sure it also works on older versions of IE. HTML: <ul> <li> <a href="/aboutme/"> <span class="img-outline"><span class="page-img" id="aboutme"></span></span> <span class="page-title">About Me</span> </a> </li> </ul> ​ CSS: .page-title { text-align: center; display:block; text-decoration: none; } .img-outline { height: 100%; background: rgba(0, 0, 0, .3); padding: 5px; display: block; margin-left: auto; margin-right: auto; -webkit-border-radius: 18%; -moz-border-radius: 18%; border-radius: 18%; } .page-img { height: 100%; background: rgba(50, 50, 50, 1); background-size:115px 115px; background-repeat:no-repeat; display: block; margin-left: auto; margin-right: auto; -webkit-border-radius: 15%; -moz-border-radius: 15%; border-radius: 15%; } li, li.current, li.current:visited { margin-left: 1px; margin-right: 1px; width: 118px; height: 112px; display: block; float: left; position: relative; opacity: .6; } li:hover { opacity: 1; } li .img-outline { width: 70px; height: 70px; } li .page-img { background-size:70px 70px; } li #aboutme { background-color: rgb(36, 112, 245); background-image: url('http://www.rasnickjewelry.com/images/uploads/900_Animals_300/901_Elephant_Head_Ring_side_R300.jpg'); } ​
css
internet-explorer
null
null
null
null
open
CSS/HTML - Issues with Internet Explorer 8 (border-radius, image cover, and padding) === I am having issues viewing my site in Internet Explorer. In the following CSS/HTML the image is supposed to be outlined, curved radius, and scaled to fit. However IE 8 does not scale the image, curve the corners, nor does the outline appear. Here is the jsfiddle: http://jsfiddle.net/pave4/ This page is fine in the newest IE (IE8), however I need to make sure it also works on older versions of IE. HTML: <ul> <li> <a href="/aboutme/"> <span class="img-outline"><span class="page-img" id="aboutme"></span></span> <span class="page-title">About Me</span> </a> </li> </ul> ​ CSS: .page-title { text-align: center; display:block; text-decoration: none; } .img-outline { height: 100%; background: rgba(0, 0, 0, .3); padding: 5px; display: block; margin-left: auto; margin-right: auto; -webkit-border-radius: 18%; -moz-border-radius: 18%; border-radius: 18%; } .page-img { height: 100%; background: rgba(50, 50, 50, 1); background-size:115px 115px; background-repeat:no-repeat; display: block; margin-left: auto; margin-right: auto; -webkit-border-radius: 15%; -moz-border-radius: 15%; border-radius: 15%; } li, li.current, li.current:visited { margin-left: 1px; margin-right: 1px; width: 118px; height: 112px; display: block; float: left; position: relative; opacity: .6; } li:hover { opacity: 1; } li .img-outline { width: 70px; height: 70px; } li .page-img { background-size:70px 70px; } li #aboutme { background-color: rgb(36, 112, 245); background-image: url('http://www.rasnickjewelry.com/images/uploads/900_Animals_300/901_Elephant_Head_Ring_side_R300.jpg'); } ​
0
11,658,595
07/25/2012 21:03:52
498,079
11/05/2010 07:52:30
65
2
iOS App with different bundle names for locales
So i'm following the instructions on the apple site to localize my app name: http://developer.apple.com/library/ios/#documentation/general/Reference/InfoPlistKeyReference/Articles/AboutInformationPropertyListFiles.html I've created a InfoPlist.strings file for locales like en_GB.lproj etc... and set the CFBundleDisplayName appropriately.Everytime I build on the simulator using the appropriate locale I dont see the custom locale name on them. Does this only work for language like fr.lproj and not locales?
ios
localization
localizable.strings
null
null
null
open
iOS App with different bundle names for locales === So i'm following the instructions on the apple site to localize my app name: http://developer.apple.com/library/ios/#documentation/general/Reference/InfoPlistKeyReference/Articles/AboutInformationPropertyListFiles.html I've created a InfoPlist.strings file for locales like en_GB.lproj etc... and set the CFBundleDisplayName appropriately.Everytime I build on the simulator using the appropriate locale I dont see the custom locale name on them. Does this only work for language like fr.lproj and not locales?
0
11,658,596
07/25/2012 21:03:52
1,198,195
02/08/2012 20:28:38
757
3
Is echoing Javascript code condtionally based on server-side logic considered harmful?
Like this: <script> setSomeStuffUp(); <?php if ($otherStuffNeedsToBeDone === true) { ?> doSomeOtherStuff(); <?php } ?> breakSomeStuffDown(); </script> Came across something like this at work- done with templating (Smarty), so it looks a bit cleaner- but not by much! Also echoes some template variables used for things such as jQuery selectors, and other little unpleasant-looking bits. What's the proper way to do this? Load the data that needs to be used for logic in the JS as JSON via AJAX? HTML data attributes? Something about it just smells bad, bad, bad. Thanks everyone.
php
javascript
jquery
html
null
null
open
Is echoing Javascript code condtionally based on server-side logic considered harmful? === Like this: <script> setSomeStuffUp(); <?php if ($otherStuffNeedsToBeDone === true) { ?> doSomeOtherStuff(); <?php } ?> breakSomeStuffDown(); </script> Came across something like this at work- done with templating (Smarty), so it looks a bit cleaner- but not by much! Also echoes some template variables used for things such as jQuery selectors, and other little unpleasant-looking bits. What's the proper way to do this? Load the data that needs to be used for logic in the JS as JSON via AJAX? HTML data attributes? Something about it just smells bad, bad, bad. Thanks everyone.
0
11,659,999
07/25/2012 23:08:42
170,365
09/08/2009 18:48:04
2,562
13
How do I load the system configuration data if it was stored in a file?
I'm setting up a system configuration in the admin backend of magento, and it currently stores it the data in a file, and I wanted to have Magento grab the data from a file to show what the current value is. What method should I be overloading to achieve this? I thought it was the `load()` function after extending `Mage_Core_Model_Config_Data`, but that was wrong.
magento
null
null
null
null
null
open
How do I load the system configuration data if it was stored in a file? === I'm setting up a system configuration in the admin backend of magento, and it currently stores it the data in a file, and I wanted to have Magento grab the data from a file to show what the current value is. What method should I be overloading to achieve this? I thought it was the `load()` function after extending `Mage_Core_Model_Config_Data`, but that was wrong.
0
11,660,000
07/25/2012 23:08:43
1,030,542
11/02/2011 00:22:28
144
1
Bash interpretaion for the command : subst Q: /D 1>nul 2>nul
I would like to know what does subst Q: /D 1>nul 2>nul command do in bash scripting
bash
script
subst
null
null
null
open
Bash interpretaion for the command : subst Q: /D 1>nul 2>nul === I would like to know what does subst Q: /D 1>nul 2>nul command do in bash scripting
0
11,660,001
07/25/2012 23:08:45
1,535,214
07/18/2012 14:51:59
11
0
Memory leak in a program with Libgcrypt
I am doing some tests with Libgcrypt and when I use valgrind to check the memory usage there is 3,200 bytes in use at exit. I have tried to use valgrind --leak-check=full --track-origins=yes --show-reachable=yes ./my_program But valgrind valgrind only complains about this line from my code: version = gcry_check_version("1.5.0"); and valgrind about internal functions of Libgcrypt. My test code is here: <http://www.tiago.eti.br/storage/post2.c> And I am using Libgcrypt 1.5.0 from Debian sid repository It is a bug of Libgcrypt or am I doing anything wrong?
c
memory-leaks
valgrind
libgcrypt
null
null
open
Memory leak in a program with Libgcrypt === I am doing some tests with Libgcrypt and when I use valgrind to check the memory usage there is 3,200 bytes in use at exit. I have tried to use valgrind --leak-check=full --track-origins=yes --show-reachable=yes ./my_program But valgrind valgrind only complains about this line from my code: version = gcry_check_version("1.5.0"); and valgrind about internal functions of Libgcrypt. My test code is here: <http://www.tiago.eti.br/storage/post2.c> And I am using Libgcrypt 1.5.0 from Debian sid repository It is a bug of Libgcrypt or am I doing anything wrong?
0
11,660,002
07/25/2012 23:08:51
1,445,020
06/08/2012 16:31:39
1
0
install ry2 on windows 7
This is again a repetition of the same problem, but I was forced to put it as new question. So please donot delete this admins! I am new to R and Rpy2. My problem is similar. I am using p*ython 2.6, R 2.15.1, rpy2 2.2.6, and Windows 7*. **R_HOME: C:\Program Files\R\R-2.15.1** Typing "R" in the command prompt does not work. **PATH: has these two--C:\Program Files\R\R-2.15.1\bin;C:\Program Files\R\R-2.15.1** **PYTHONPATH: C:\Python26\ArcGIS10.0\Lib;C:\Python26\ArcGIS10.0\DLLs;C:\Python26\ArcGIS10.0\Lib\lib-tk** When I run the setup.py I get "**error: no commands supplied**"! I tried putting all file from bin/i386 to directly under bin. My rinterface->init.py is different. However this is what I did: # MSWindows-specific code _win_ok = False if sys.platform in _win_bindirs.keys(): import win32api if os.path.exists(os.path.join(R_HOME, 'lib')): ## ADDED ## os.environ['PATH'] += ';' + os.path.join(R_HOME, 'bin') os.environ['PATH'] += ';' + os.path.join(R_HOME, 'modules') os.environ['PATH'] += ';' + os.path.join(R_HOME, 'lib') R_DLL_DIRS = ('bin', 'lib') else: ## ADDED ## os.environ['PATH'] += ';' + os.path.join(R_HOME, 'bin', 'i386') ## ADDED ## os.environ['PATH'] += ';' + os.path.join(R_HOME, 'modules', 'i386') ## ADDED ## os.environ['PATH'] += ';' + os.path.join(R_HOME, 'library') ## ADDED ## R_DLL_DIRS = ('bin', 'library') # Load the R dll using the explicit path # Try dirs in R_DLL_DIRS for r_dir in R_DLL_DIRS: Rlib = os.path.join(R_HOME, r_dir, _win_bindirs[sys.platform], 'R.dll') if not os.path.exists(Rlib): continue win32api.LoadLibrary(Rlib) _win_ok = True break # Otherwise fail out! if not _win_ok: raise RuntimeError("Unable to locate R.dll within %s" % R_HOME) # cleanup the namespace del(os) Nothing changes the setup.py error message. I am at my wits end. Please help!! Avishek
rpy2
null
null
null
null
null
open
install ry2 on windows 7 === This is again a repetition of the same problem, but I was forced to put it as new question. So please donot delete this admins! I am new to R and Rpy2. My problem is similar. I am using p*ython 2.6, R 2.15.1, rpy2 2.2.6, and Windows 7*. **R_HOME: C:\Program Files\R\R-2.15.1** Typing "R" in the command prompt does not work. **PATH: has these two--C:\Program Files\R\R-2.15.1\bin;C:\Program Files\R\R-2.15.1** **PYTHONPATH: C:\Python26\ArcGIS10.0\Lib;C:\Python26\ArcGIS10.0\DLLs;C:\Python26\ArcGIS10.0\Lib\lib-tk** When I run the setup.py I get "**error: no commands supplied**"! I tried putting all file from bin/i386 to directly under bin. My rinterface->init.py is different. However this is what I did: # MSWindows-specific code _win_ok = False if sys.platform in _win_bindirs.keys(): import win32api if os.path.exists(os.path.join(R_HOME, 'lib')): ## ADDED ## os.environ['PATH'] += ';' + os.path.join(R_HOME, 'bin') os.environ['PATH'] += ';' + os.path.join(R_HOME, 'modules') os.environ['PATH'] += ';' + os.path.join(R_HOME, 'lib') R_DLL_DIRS = ('bin', 'lib') else: ## ADDED ## os.environ['PATH'] += ';' + os.path.join(R_HOME, 'bin', 'i386') ## ADDED ## os.environ['PATH'] += ';' + os.path.join(R_HOME, 'modules', 'i386') ## ADDED ## os.environ['PATH'] += ';' + os.path.join(R_HOME, 'library') ## ADDED ## R_DLL_DIRS = ('bin', 'library') # Load the R dll using the explicit path # Try dirs in R_DLL_DIRS for r_dir in R_DLL_DIRS: Rlib = os.path.join(R_HOME, r_dir, _win_bindirs[sys.platform], 'R.dll') if not os.path.exists(Rlib): continue win32api.LoadLibrary(Rlib) _win_ok = True break # Otherwise fail out! if not _win_ok: raise RuntimeError("Unable to locate R.dll within %s" % R_HOME) # cleanup the namespace del(os) Nothing changes the setup.py error message. I am at my wits end. Please help!! Avishek
0
11,659,721
07/25/2012 22:36:53
1,553,006
07/25/2012 22:27:42
1
0
Node.js Configure Error: no acceptable C compiler
I am working on a hostgator linux server through SSH trying to install and use node.js. I followed the instructions on [github.com/joyent/node/wiki/Installation][1], specifically this section. > tar -zxf node-v0.6.18.tar.gz #Download this from nodejs.org > cd node-v0.6.18 > ./configure > make > sudo make install When I type ./configure I get this error. > Node.js configure error: No acceptable C compiler found! > Please Make sure you have a C compiler installed on your system and/or consider adjusting the CC environment variable if you installed it in a non-standard prefix. [1]: https://github.com/joyent/node/wiki/Installation
node.js
null
null
null
null
null
open
Node.js Configure Error: no acceptable C compiler === I am working on a hostgator linux server through SSH trying to install and use node.js. I followed the instructions on [github.com/joyent/node/wiki/Installation][1], specifically this section. > tar -zxf node-v0.6.18.tar.gz #Download this from nodejs.org > cd node-v0.6.18 > ./configure > make > sudo make install When I type ./configure I get this error. > Node.js configure error: No acceptable C compiler found! > Please Make sure you have a C compiler installed on your system and/or consider adjusting the CC environment variable if you installed it in a non-standard prefix. [1]: https://github.com/joyent/node/wiki/Installation
0
11,659,722
07/25/2012 22:36:56
1,009,859
10/23/2011 19:14:08
1
1
Form a Json array in $.each function in jquery
I need to create a array which needs to have custom index and value in jquery each function. For eg. i need to create an array like this [4: 'sampleIndex1','test':'sampleIndex2']; But while using each function jquery takes '4' index will be an 4th index of an array remaining index 0,1,2,3 will set an value to empty. I dont need 0 1 2 3 index in the array. Instant help is much appreciated!!! Thanks in advance,
jquery
json
null
null
null
null
open
Form a Json array in $.each function in jquery === I need to create a array which needs to have custom index and value in jquery each function. For eg. i need to create an array like this [4: 'sampleIndex1','test':'sampleIndex2']; But while using each function jquery takes '4' index will be an 4th index of an array remaining index 0,1,2,3 will set an value to empty. I dont need 0 1 2 3 index in the array. Instant help is much appreciated!!! Thanks in advance,
0
11,542,227
07/18/2012 13:12:05
3,856
08/31/2008 12:18:42
761
12
How can I tell how long Solr replications and commits take
I know that my Solr commitWithin should be set to a greater length than a commit usually takes. Likewise, in my replicated setup, I guess my pollInterval should be set to something longer than a replication takes. I can't work out how to see how long commits and replications take though - how do I do it?
solr
null
null
null
null
null
open
How can I tell how long Solr replications and commits take === I know that my Solr commitWithin should be set to a greater length than a commit usually takes. Likewise, in my replicated setup, I guess my pollInterval should be set to something longer than a replication takes. I can't work out how to see how long commits and replications take though - how do I do it?
0
11,542,228
07/18/2012 13:12:05
1,531,621
07/17/2012 11:36:41
1
0
why i cant add text that shiws my class name to jquery handle?
inClass = "'"+'.'+inClass+"'"; //inClass is a string $(inClass).show(); chrome console error >> Uncaught Error: Syntax error, unrecognized expression: '' I want inclass string dynamically change how can I select it with jquery? Please help
jquery
null
null
null
null
null
open
why i cant add text that shiws my class name to jquery handle? === inClass = "'"+'.'+inClass+"'"; //inClass is a string $(inClass).show(); chrome console error >> Uncaught Error: Syntax error, unrecognized expression: '' I want inclass string dynamically change how can I select it with jquery? Please help
0
11,542,253
07/18/2012 13:13:32
1,512,411
07/09/2012 15:22:30
1
0
Converting csv to excel PHP
i am generating a csv file throug json in my application. But when i open it its nit formated . is there any script in php availabe to convert from csv to excel? My output now is: ,"12","1","1","","","","","","","","","","0","0","0","0","0","","","0","","","","0","0","0"2121","0","","1","1","","","non","210,"0","0","0","0","07:00","","","0","","", Thank you in advance Please help
php
json
excel
null
null
null
open
Converting csv to excel PHP === i am generating a csv file throug json in my application. But when i open it its nit formated . is there any script in php availabe to convert from csv to excel? My output now is: ,"12","1","1","","","","","","","","","","0","0","0","0","0","","","0","","","","0","0","0"2121","0","","1","1","","","non","210,"0","0","0","0","07:00","","","0","","", Thank you in advance Please help
0
11,542,255
07/18/2012 13:13:41
1,154,581
01/17/2012 18:06:43
28
3
ldconfig error: is not a symbolic link
When running: sudo /sbin/ldconfig the following error appears: /sbin/ldconfig: /usr/local/lib/ is not a symbolic link When I run file: file /usr/local/lib/ /usr/local/lib/: directory Inside /usr/local/lib/ there is 3 libs that I use, I'll call them here as lib1, lib2 and lib3. Now, when I do a ldd on my binary it results: lib1.so => not found lib2.so => not found lib3.so => /usr/local/lib/lib3.so (0x00216000) But all of then are in the same folder as /usr/local/lib/{lib1.so,lib2.so,lib3.so} Everytime I run ldconfig the same error appears, "/usr/local/lib/ is not a symbolic link" I thought /usr/local/lib should be declared twice in /etc/ld.conf.d/*.conf, but not: egrep '' * | grep '\/usr\/local' projectA.conf.old:/usr/local/projectA/lib local.conf:/usr/local/lib ld.so.conf only includes /etc/ld.so.conf.d/*.conf, so this *.old isn't processed, and it refers to /usr/local/projectA/lib. After a time tring I deleted all lib1 and lib2 (at some point I tested it on binary's folder), the same error occurs.
c++
c
linux
make
gnu-make
null
open
ldconfig error: is not a symbolic link === When running: sudo /sbin/ldconfig the following error appears: /sbin/ldconfig: /usr/local/lib/ is not a symbolic link When I run file: file /usr/local/lib/ /usr/local/lib/: directory Inside /usr/local/lib/ there is 3 libs that I use, I'll call them here as lib1, lib2 and lib3. Now, when I do a ldd on my binary it results: lib1.so => not found lib2.so => not found lib3.so => /usr/local/lib/lib3.so (0x00216000) But all of then are in the same folder as /usr/local/lib/{lib1.so,lib2.so,lib3.so} Everytime I run ldconfig the same error appears, "/usr/local/lib/ is not a symbolic link" I thought /usr/local/lib should be declared twice in /etc/ld.conf.d/*.conf, but not: egrep '' * | grep '\/usr\/local' projectA.conf.old:/usr/local/projectA/lib local.conf:/usr/local/lib ld.so.conf only includes /etc/ld.so.conf.d/*.conf, so this *.old isn't processed, and it refers to /usr/local/projectA/lib. After a time tring I deleted all lib1 and lib2 (at some point I tested it on binary's folder), the same error occurs.
0
11,531,353
07/17/2012 21:47:50
516,126
11/22/2010 13:08:15
709
57
Viewing NSData contents in XCode
I am running XCode and I would like to dump out a NSData*. The variable in question is buffer. Is there a way to do this through the UI or the GDB debugger? :![eThis is what I see at runtime][1] [1]: http://i.stack.imgur.com/koVDS.png
objective-c
xcode
null
null
null
null
open
Viewing NSData contents in XCode === I am running XCode and I would like to dump out a NSData*. The variable in question is buffer. Is there a way to do this through the UI or the GDB debugger? :![eThis is what I see at runtime][1] [1]: http://i.stack.imgur.com/koVDS.png
0
11,542,258
07/18/2012 13:13:45
867,497
07/28/2011 12:53:23
361
19
How to detect the internet connection in sencha touch
I have a small application based on Sencha touch. this application should submit data to the server lets say this is an example of Ajax call that I did Ext.Ajax.request({ url: 'http://www.google.com', timeout:30*1000, success: function(response, opts) { console.dir('success'); }, failure: function(response, opts) { console.log('server-side failure with status code ' + response.status); } Now the > failure never gets called if I have a network connection but without internet !! the problem that I have my client does not have a solid internet connection but he has a wifi all the time ! So , everything I found on the net detect if I have a Network connection ! but I already have one but this connection does not provide Internet. anyone knows how to detect the Internet connection not the Network? FYI : I tried the navigator.online and the network state examples all of them does not detect internet, also I attached a phoneGap listener since I'm using sencha with phoneGap to create a iOS app !
networking
phonegap
sencha
null
null
null
open
How to detect the internet connection in sencha touch === I have a small application based on Sencha touch. this application should submit data to the server lets say this is an example of Ajax call that I did Ext.Ajax.request({ url: 'http://www.google.com', timeout:30*1000, success: function(response, opts) { console.dir('success'); }, failure: function(response, opts) { console.log('server-side failure with status code ' + response.status); } Now the > failure never gets called if I have a network connection but without internet !! the problem that I have my client does not have a solid internet connection but he has a wifi all the time ! So , everything I found on the net detect if I have a Network connection ! but I already have one but this connection does not provide Internet. anyone knows how to detect the Internet connection not the Network? FYI : I tried the navigator.online and the network state examples all of them does not detect internet, also I attached a phoneGap listener since I'm using sencha with phoneGap to create a iOS app !
0
11,542,259
07/18/2012 13:13:49
1,492,994
06/30/2012 12:33:32
120
2
Why cvFindContours() method doesn't detect Contours correctly in javacv?
I went through many questions in stackoverflow and able to develop small program to detect squares and rectangles correctly. This is my sample code public static CvSeq findSquares( final IplImage src, CvMemStorage storage) { CvSeq squares = new CvContour(); squares = cvCreateSeq(0, sizeof(CvContour.class), sizeof(CvSeq.class), storage); IplImage pyr = null, timg = null, gray = null, tgray; timg = cvCloneImage(src); CvSize sz = cvSize(src.width(), src.height()); tgray = cvCreateImage(sz, src.depth(), 1); gray = cvCreateImage(sz, src.depth(), 1); // cvCvtColor(gray, src, 1); pyr = cvCreateImage(cvSize(sz.width()/2, sz.height()/2), src.depth(),src.nChannels()); // down-scale and upscale the image to filter out the noise // cvPyrDown(timg, pyr, CV_GAUSSIAN_5x5); // cvPyrUp(pyr, timg, CV_GAUSSIAN_5x5); // cvSaveImage("ha.jpg",timg); CvSeq contours = new CvContour(); // request closing of the application when the image window is closed // show image on window // find squares in every color plane of the image for( int c = 0; c < 3; c++ ) { IplImage channels[] = {cvCreateImage(sz, 8, 1), cvCreateImage(sz, 8, 1), cvCreateImage(sz, 8, 1)}; channels[c] = cvCreateImage(sz, 8, 1); if(src.nChannels() > 1){ cvSplit(timg, channels[0], channels[1], channels[2], null); }else{ tgray = cvCloneImage(timg); } tgray = channels[c]; // // try several threshold levels for( int l = 0; l < N; l++ ) { // hack: use Canny instead of zero threshold level. // Canny helps to catch squares with gradient shading if( l == 0 ) { // apply Canny. Take the upper threshold from slider // and set the lower to 0 (which forces edges merging) cvCanny(tgray, gray, 0, thresh, 5); // dilate canny output to remove potential // // holes between edge segments cvDilate(gray, gray, null, 1); } else { // apply threshold if l!=0: cvThreshold(tgray, gray, (l+1)*255/N, 255, CV_THRESH_BINARY); } // find contours and store them all as a list cvFindContours(gray, storage, contours, sizeof(CvContour.class), CV_RETR_LIST, CV_CHAIN_APPROX_SIMPLE); CvSeq approx; // test each contour while (contours != null && !contours.isNull()) { if (contours.elem_size() > 0) { approx = cvApproxPoly(contours, Loader.sizeof(CvContour.class), storage, CV_POLY_APPROX_DP, cvContourPerimeter(contours)*0.02, 0); if( approx.total() == 4 && Math.abs(cvContourArea(approx, CV_WHOLE_SEQ, 0)) > 1000 && cvCheckContourConvexity(approx) != 0 ){ double maxCosine = 0; // for( int j = 2; j < 5; j++ ) { // find the maximum cosine of the angle between joint edges double cosine = Math.abs(angle(new CvPoint(cvGetSeqElem(approx, j%4)), new CvPoint(cvGetSeqElem(approx, j-2)), new CvPoint(cvGetSeqElem(approx, j-1)))); maxCosine = Math.max(maxCosine, cosine); } if( maxCosine < 0.2 ){ CvRect x=cvBoundingRect(approx, l); if((x.width()*x.height())<50000 ){ System.out.println("Width : "+x.width()+" Height : "+x.height()); cvSeqPush(squares, approx); } } } } contours = contours.h_next(); } contours = new CvContour(); } } return squares; } I use This image to detect rectangles and squares ![enter image description here][1] I need to identify following out puts ![enter image description here][2] and ![enter image description here][3] But when I run above code it detect only following rectangles. But I doesn't know the reason for that. Please can some one explain the reason for that. This is the out put that I got. ![enter image description here][4] Please be kind enough to explain the problem in above code and give some suggensions to detect this squares and rectangles. [1]: http://i.stack.imgur.com/cZ2Ka.jpg [2]: http://i.stack.imgur.com/uiDtZ.jpg [3]: http://i.stack.imgur.com/MAHmR.jpg [4]: http://i.stack.imgur.com/jaUsX.png
java
opencv
javacv
null
null
null
open
Why cvFindContours() method doesn't detect Contours correctly in javacv? === I went through many questions in stackoverflow and able to develop small program to detect squares and rectangles correctly. This is my sample code public static CvSeq findSquares( final IplImage src, CvMemStorage storage) { CvSeq squares = new CvContour(); squares = cvCreateSeq(0, sizeof(CvContour.class), sizeof(CvSeq.class), storage); IplImage pyr = null, timg = null, gray = null, tgray; timg = cvCloneImage(src); CvSize sz = cvSize(src.width(), src.height()); tgray = cvCreateImage(sz, src.depth(), 1); gray = cvCreateImage(sz, src.depth(), 1); // cvCvtColor(gray, src, 1); pyr = cvCreateImage(cvSize(sz.width()/2, sz.height()/2), src.depth(),src.nChannels()); // down-scale and upscale the image to filter out the noise // cvPyrDown(timg, pyr, CV_GAUSSIAN_5x5); // cvPyrUp(pyr, timg, CV_GAUSSIAN_5x5); // cvSaveImage("ha.jpg",timg); CvSeq contours = new CvContour(); // request closing of the application when the image window is closed // show image on window // find squares in every color plane of the image for( int c = 0; c < 3; c++ ) { IplImage channels[] = {cvCreateImage(sz, 8, 1), cvCreateImage(sz, 8, 1), cvCreateImage(sz, 8, 1)}; channels[c] = cvCreateImage(sz, 8, 1); if(src.nChannels() > 1){ cvSplit(timg, channels[0], channels[1], channels[2], null); }else{ tgray = cvCloneImage(timg); } tgray = channels[c]; // // try several threshold levels for( int l = 0; l < N; l++ ) { // hack: use Canny instead of zero threshold level. // Canny helps to catch squares with gradient shading if( l == 0 ) { // apply Canny. Take the upper threshold from slider // and set the lower to 0 (which forces edges merging) cvCanny(tgray, gray, 0, thresh, 5); // dilate canny output to remove potential // // holes between edge segments cvDilate(gray, gray, null, 1); } else { // apply threshold if l!=0: cvThreshold(tgray, gray, (l+1)*255/N, 255, CV_THRESH_BINARY); } // find contours and store them all as a list cvFindContours(gray, storage, contours, sizeof(CvContour.class), CV_RETR_LIST, CV_CHAIN_APPROX_SIMPLE); CvSeq approx; // test each contour while (contours != null && !contours.isNull()) { if (contours.elem_size() > 0) { approx = cvApproxPoly(contours, Loader.sizeof(CvContour.class), storage, CV_POLY_APPROX_DP, cvContourPerimeter(contours)*0.02, 0); if( approx.total() == 4 && Math.abs(cvContourArea(approx, CV_WHOLE_SEQ, 0)) > 1000 && cvCheckContourConvexity(approx) != 0 ){ double maxCosine = 0; // for( int j = 2; j < 5; j++ ) { // find the maximum cosine of the angle between joint edges double cosine = Math.abs(angle(new CvPoint(cvGetSeqElem(approx, j%4)), new CvPoint(cvGetSeqElem(approx, j-2)), new CvPoint(cvGetSeqElem(approx, j-1)))); maxCosine = Math.max(maxCosine, cosine); } if( maxCosine < 0.2 ){ CvRect x=cvBoundingRect(approx, l); if((x.width()*x.height())<50000 ){ System.out.println("Width : "+x.width()+" Height : "+x.height()); cvSeqPush(squares, approx); } } } } contours = contours.h_next(); } contours = new CvContour(); } } return squares; } I use This image to detect rectangles and squares ![enter image description here][1] I need to identify following out puts ![enter image description here][2] and ![enter image description here][3] But when I run above code it detect only following rectangles. But I doesn't know the reason for that. Please can some one explain the reason for that. This is the out put that I got. ![enter image description here][4] Please be kind enough to explain the problem in above code and give some suggensions to detect this squares and rectangles. [1]: http://i.stack.imgur.com/cZ2Ka.jpg [2]: http://i.stack.imgur.com/uiDtZ.jpg [3]: http://i.stack.imgur.com/MAHmR.jpg [4]: http://i.stack.imgur.com/jaUsX.png
0
11,542,260
07/18/2012 13:13:51
461,551
09/29/2010 09:30:07
184
6
Where to place one single html page in Liferay
I have few html pages from my old site that I want to place somewhere on the server where my Liferay theme is and link to those from my Liferay site. Where to save these pages? I created one folder under the _diffs folder named 'HTML', put the html pages there and did the linking from there. It works well, but I was wondering if I am allowed to play with the folder structure of my theme like this? If not, how to approach this? Thanks in advance. Adia
liferay-6
null
null
null
null
null
open
Where to place one single html page in Liferay === I have few html pages from my old site that I want to place somewhere on the server where my Liferay theme is and link to those from my Liferay site. Where to save these pages? I created one folder under the _diffs folder named 'HTML', put the html pages there and did the linking from there. It works well, but I was wondering if I am allowed to play with the folder structure of my theme like this? If not, how to approach this? Thanks in advance. Adia
0
11,542,267
07/18/2012 13:14:12
1,514,026
07/10/2012 07:36:41
29
0
Even Though I'm Overwriting a CSS Class The Old Width Value is Used
I have two CSS files, let's call them style1.css and style2.css for simplicity's sake. I include them in this order: <link rel="stylesheet" type="text/css" href="'.Layout::path().'style/style1.css" /> <link rel="stylesheet" type="text/css" href="'.Layout::path().'style/style2.css" /> Style one is a more general file with lots of classes and attributes. Style2 overwrites these. For example, style1 has this: .row-fluid > .span9 { width: 74.358974359%; } Whereas, style2 has: .span9{ width:50%; } I have some .row-fluid DIVs that contain .span9 elements and the first style is used for them, even though browsers should accept only the last CSS rule if duplicate selectors are found. I discover this by going to Chrome Developer Tools and I see the span9 definition coming from style9 as crossed and the definition from style1 is at the top and is used instead. PS: To be specific, style1 is the Twitter Bootstrap CSS and style2 is my own CSS started from scratch.
css
twitter-bootstrap
null
null
null
null
open
Even Though I'm Overwriting a CSS Class The Old Width Value is Used === I have two CSS files, let's call them style1.css and style2.css for simplicity's sake. I include them in this order: <link rel="stylesheet" type="text/css" href="'.Layout::path().'style/style1.css" /> <link rel="stylesheet" type="text/css" href="'.Layout::path().'style/style2.css" /> Style one is a more general file with lots of classes and attributes. Style2 overwrites these. For example, style1 has this: .row-fluid > .span9 { width: 74.358974359%; } Whereas, style2 has: .span9{ width:50%; } I have some .row-fluid DIVs that contain .span9 elements and the first style is used for them, even though browsers should accept only the last CSS rule if duplicate selectors are found. I discover this by going to Chrome Developer Tools and I see the span9 definition coming from style9 as crossed and the definition from style1 is at the top and is used instead. PS: To be specific, style1 is the Twitter Bootstrap CSS and style2 is my own CSS started from scratch.
0
11,542,271
07/18/2012 13:14:28
1,534,842
07/18/2012 12:57:27
1
0
Using non-canvas elements as imagedata in an overlaying canvas
I've got a simple webpage with, let's keep it simple, black and white elements in it. The elements have arbitrary shapes. Now I would like to partially overlay them with one canvas element, that acts as an 'adjustment layer'. I want the canvas to invert the color of everything laying behind it. It must be possible to copy absolute pixel data from the website and process it in a canvas, right? Thanks in advance, Declan
html5
canvas
layer
adjustment
null
null
open
Using non-canvas elements as imagedata in an overlaying canvas === I've got a simple webpage with, let's keep it simple, black and white elements in it. The elements have arbitrary shapes. Now I would like to partially overlay them with one canvas element, that acts as an 'adjustment layer'. I want the canvas to invert the color of everything laying behind it. It must be possible to copy absolute pixel data from the website and process it in a canvas, right? Thanks in advance, Declan
0
11,481,149
07/14/2012 04:47:27
576,510
01/15/2011 05:51:55
631
0
Difference in DAL with repository pattern and DAL without repository pattern?
Some time back I started using EF as a DAL and from tutorials and videos come to know about repository pattern and Unit of work patterns. About repository I learned it is an abstraction over DAL and it separate business logic from data access code. Also that it avoid reputation of data access code and help in unit testing. I understand repository pattern is a particular way of making DAL. But what it brings ? I am not getting. My confusion is just making a DAL (a separate class library/ project) it will also give these benefits (separate data access logic from business logic, save data access code reputation, help in unit testing etc). Probably I am still missing benefits of repository patren. Please guide me on this.
c#
entity-framework
design-patterns
repository-pattern
null
null
open
Difference in DAL with repository pattern and DAL without repository pattern? === Some time back I started using EF as a DAL and from tutorials and videos come to know about repository pattern and Unit of work patterns. About repository I learned it is an abstraction over DAL and it separate business logic from data access code. Also that it avoid reputation of data access code and help in unit testing. I understand repository pattern is a particular way of making DAL. But what it brings ? I am not getting. My confusion is just making a DAL (a separate class library/ project) it will also give these benefits (separate data access logic from business logic, save data access code reputation, help in unit testing etc). Probably I am still missing benefits of repository patren. Please guide me on this.
0
11,481,150
07/14/2012 04:47:33
1,175,681
01/28/2012 20:20:01
1
0
Batch file call sub-batch file to pass n paramenters and return without use of file
I looking for a way using windows batch file that call sub-batch file which pass 1-9 parameters and return value (string) without the need of saving the return value into file/etc. I look at @FOR /F "tokens=*" %%i IN ('%find_OS_version%') DO SET OS_VER=%%i and Call function/batch %arg1% %arg2% I'm not seeing how I can setup to do this
batch
batch-file
null
null
null
null
open
Batch file call sub-batch file to pass n paramenters and return without use of file === I looking for a way using windows batch file that call sub-batch file which pass 1-9 parameters and return value (string) without the need of saving the return value into file/etc. I look at @FOR /F "tokens=*" %%i IN ('%find_OS_version%') DO SET OS_VER=%%i and Call function/batch %arg1% %arg2% I'm not seeing how I can setup to do this
0
11,542,277
07/18/2012 13:14:42
129,805
06/27/2009 11:51:28
2,299
22
Has anyone ported the Yesod chat-example to websockets?
Has anyone ported the Yesod chat-example to websockets? http://www.yesodweb.com/book/wiki-chat-example https://github.com/yesodweb/wai/blob/master/wai-websockets/Network/Wai/Handler/WebSockets.hs
websocket
yesod
null
null
null
null
open
Has anyone ported the Yesod chat-example to websockets? === Has anyone ported the Yesod chat-example to websockets? http://www.yesodweb.com/book/wiki-chat-example https://github.com/yesodweb/wai/blob/master/wai-websockets/Network/Wai/Handler/WebSockets.hs
0
11,350,500
07/05/2012 18:39:14
282,706
02/27/2010 14:40:21
5,230
255
Ruby Hash .keys and .values, safe to assume same order?
Rudimentary irb testing suggests that Ruby Hash returns `.keys` and `.values` in matching order. Is it safe to assume that this is the case?
ruby
hash
null
null
null
null
open
Ruby Hash .keys and .values, safe to assume same order? === Rudimentary irb testing suggests that Ruby Hash returns `.keys` and `.values` in matching order. Is it safe to assume that this is the case?
0
11,350,503
07/05/2012 18:39:32
1,476,115
06/22/2012 23:09:42
1
0
Web design template for Data Analysis
I'm looking for any help on web design templates (CSS, HTML, etc.) for "Data Analysis" website that I'm willing to design. By data analysis, I refer to some basic interactive charts using gRaphael and other javascript libraries. Thank you
javascript
css
analytics
analysis
graphael
07/06/2012 04:08:52
not a real question
Web design template for Data Analysis === I'm looking for any help on web design templates (CSS, HTML, etc.) for "Data Analysis" website that I'm willing to design. By data analysis, I refer to some basic interactive charts using gRaphael and other javascript libraries. Thank you
1
11,350,620
07/05/2012 18:46:56
1,493,440
06/30/2012 19:00:37
3
0
app store version crashes but in debug mode it is okay
I have an app in app store. After updating my app, it crashes right after it launches. (see a black screen for less than a second and then it is like i pressed the home button.) I tested it on my iphone attached to xcode and it is okay in debug mode. i tested it in 5.1.0 and it is okay. when i download it from app store it crashes. any one had troubles with 5.1.1 ?
iphone
ios
xcode
null
null
null
open
app store version crashes but in debug mode it is okay === I have an app in app store. After updating my app, it crashes right after it launches. (see a black screen for less than a second and then it is like i pressed the home button.) I tested it on my iphone attached to xcode and it is okay in debug mode. i tested it in 5.1.0 and it is okay. when i download it from app store it crashes. any one had troubles with 5.1.1 ?
0
11,350,625
07/05/2012 18:47:29
812,715
06/23/2011 17:17:25
728
55
CorePlot: Updating X Axis range in real time plotting
I've check out most of the questions that seemed the most relevant but none of them really touched on what I'm having a bit of trouble with at the moment. My problem is that, while I know that I need to update plotSpace.xRange no matter how I try to update it, either nothing happens, or I get a crash. What I'm currently doing is I have 2 global variables(xMinVal, xMaxVal) declared in my RealTimeScatterPlot.m file, and those are what I'm using for my plotSpace.xRange calculation upon plot initialization. Then, my viewcontroller that is hosting the plot view contains a function that generates and plots a random point every second. Inside this function I track to see if I have more than 25(my default x axis range is from 0 to 50 for the moment) points, and if I do, I attempt to increment my global values in RealTimeScatterPlot.m by one, which should in theory shift the view of my graph by 1. The first incrementation happens, though the view does not shift, nor am I then able to increment again as the values just remain the same. If seeing code would help let me know and I'll edit it in, but its all very straightforward/generic. I'm thinking that instead of a coding issue this is probably just not the way I'm supposed to be implementing this. Any insight would be very much appreciated!
iphone
ios
xcode
ios5
core-plot
null
open
CorePlot: Updating X Axis range in real time plotting === I've check out most of the questions that seemed the most relevant but none of them really touched on what I'm having a bit of trouble with at the moment. My problem is that, while I know that I need to update plotSpace.xRange no matter how I try to update it, either nothing happens, or I get a crash. What I'm currently doing is I have 2 global variables(xMinVal, xMaxVal) declared in my RealTimeScatterPlot.m file, and those are what I'm using for my plotSpace.xRange calculation upon plot initialization. Then, my viewcontroller that is hosting the plot view contains a function that generates and plots a random point every second. Inside this function I track to see if I have more than 25(my default x axis range is from 0 to 50 for the moment) points, and if I do, I attempt to increment my global values in RealTimeScatterPlot.m by one, which should in theory shift the view of my graph by 1. The first incrementation happens, though the view does not shift, nor am I then able to increment again as the values just remain the same. If seeing code would help let me know and I'll edit it in, but its all very straightforward/generic. I'm thinking that instead of a coding issue this is probably just not the way I'm supposed to be implementing this. Any insight would be very much appreciated!
0
11,350,629
07/05/2012 18:47:49
506,971
11/13/2010 20:56:16
570
8
send facebook user request from django?
I have a django-based website and am using django-facebook for authentication so our users sign in with their facebook accounts. On my site a user can create a team, and then can invite users to join his team. For a user with a team with id 1, the URL where someone can join his team would be `mysite.com/team/1/join/`, but obviously one would have to be signed in to join the team. So what I want is for that user to be able to invite his facebook friends and send them some sort of notification saying "<username> wants you to join his team on mysite.com!" or something like that, and then there should be like one of those windows that says ("mysite requests access to the following...") - those windows that facebook displays before you grant an app permission or something - and then the user should be automatically signed into the site via facebook and should be redirected to `mysite.com/team/1/join`. I have looked all over `django-facebook`, as well as at the various dialog options (feed, send, and request) on the Facebook developers site. I don't need specific code here, just direction to a resource that would show me how to do this, or otherwise why what I'm trying to do can't be done and a good work-around solution.
django
django-facebook
facebook-requests
null
null
null
open
send facebook user request from django? === I have a django-based website and am using django-facebook for authentication so our users sign in with their facebook accounts. On my site a user can create a team, and then can invite users to join his team. For a user with a team with id 1, the URL where someone can join his team would be `mysite.com/team/1/join/`, but obviously one would have to be signed in to join the team. So what I want is for that user to be able to invite his facebook friends and send them some sort of notification saying "<username> wants you to join his team on mysite.com!" or something like that, and then there should be like one of those windows that says ("mysite requests access to the following...") - those windows that facebook displays before you grant an app permission or something - and then the user should be automatically signed into the site via facebook and should be redirected to `mysite.com/team/1/join`. I have looked all over `django-facebook`, as well as at the various dialog options (feed, send, and request) on the Facebook developers site. I don't need specific code here, just direction to a resource that would show me how to do this, or otherwise why what I'm trying to do can't be done and a good work-around solution.
0
11,350,631
07/05/2012 18:48:03
957,500
09/21/2011 17:15:25
728
51
PHP Loop MySQL results into array
I have a table called 'people' with the columns 'id'(PK), 'fname', and 'lname'. It's simple enough to setup a loop out of the data: $rs = mysql_query("SELECT * FROM people"); while($row=mysql_fetch_array($rs)){ ...do stuff... } However, what I'm looking to do is loop the column/value pairs into an array automatically. So, if I added a new column for 'email' I can call the central function and just pull from: $results['email'] ...while looping through the array.
php
mysql
arrays
null
null
null
open
PHP Loop MySQL results into array === I have a table called 'people' with the columns 'id'(PK), 'fname', and 'lname'. It's simple enough to setup a loop out of the data: $rs = mysql_query("SELECT * FROM people"); while($row=mysql_fetch_array($rs)){ ...do stuff... } However, what I'm looking to do is loop the column/value pairs into an array automatically. So, if I added a new column for 'email' I can call the central function and just pull from: $results['email'] ...while looping through the array.
0
11,350,633
07/05/2012 18:48:20
1,445,225
06/08/2012 18:44:37
3
0
Ipad Mirroring - How to mirror a different view?
My friends, I don't know if "mirroring" is correct term for this but I have an Ipad app that take pictures and keep in core data. I've googled around but I can't find. What I want is on the iTV shows an image different the iPad. For example: While I don't take any pictures, the iTV shows saved images on tv screen.. when I take a new picture that stop and shows the new picture.
objective-c
ipad
mirroring
null
null
null
open
Ipad Mirroring - How to mirror a different view? === My friends, I don't know if "mirroring" is correct term for this but I have an Ipad app that take pictures and keep in core data. I've googled around but I can't find. What I want is on the iTV shows an image different the iPad. For example: While I don't take any pictures, the iTV shows saved images on tv screen.. when I take a new picture that stop and shows the new picture.
0
11,350,634
07/05/2012 18:48:20
258,660
01/25/2010 18:16:10
20
0
How to create fully accessible nested dropdown lists using WAI-ARIA?
A few days ago, I have started searching on the Internet for tutorials and documentation about WAI-ARIA for just about any kind of AJAX requests. I am used to coding nested dropdown lists using jQuery and AJAX. It works pretty well but is not natively accessible. We need to use WAI-ARIA specific tags to "enable" accessibility for all kind of dynamic stuffs like AJAX, for instance. One of my requirement is the following: Let's say I have a State dropdown that updates a Region dropdown using the onchange event. How can I interact with the screen reader using WAI-ARIA and jQuery in order to tell the user that the Region dropdown list has been updated? Any idea? Many thanks!
accessibility
aria
wai
null
null
null
open
How to create fully accessible nested dropdown lists using WAI-ARIA? === A few days ago, I have started searching on the Internet for tutorials and documentation about WAI-ARIA for just about any kind of AJAX requests. I am used to coding nested dropdown lists using jQuery and AJAX. It works pretty well but is not natively accessible. We need to use WAI-ARIA specific tags to "enable" accessibility for all kind of dynamic stuffs like AJAX, for instance. One of my requirement is the following: Let's say I have a State dropdown that updates a Region dropdown using the onchange event. How can I interact with the screen reader using WAI-ARIA and jQuery in order to tell the user that the Region dropdown list has been updated? Any idea? Many thanks!
0
11,472,410
07/13/2012 14:22:32
1,523,770
07/13/2012 14:04:27
1
0
php| header("Location: http://echo2.site40.net/cms/admin/login.php" ); not workin
header("Location: http://echo2.site40.net/cms/admin/login.php" ); not working help thanks ____ <?php session_start(); if (isset($_SESSION['user'])){ ?> <html> <head> <title> Admin Panel </title> </head> <body> </body </html> <?php } else { header("Location: http://echo2.site40.net/cms/admin/login.php" ); } ?>
php
location
null
null
null
null
open
php| header("Location: http://echo2.site40.net/cms/admin/login.php" ); not workin === header("Location: http://echo2.site40.net/cms/admin/login.php" ); not working help thanks ____ <?php session_start(); if (isset($_SESSION['user'])){ ?> <html> <head> <title> Admin Panel </title> </head> <body> </body </html> <?php } else { header("Location: http://echo2.site40.net/cms/admin/login.php" ); } ?>
0
11,472,414
07/13/2012 14:22:45
1,474,943
06/22/2012 13:24:48
97
22
PHP LINKQ Fails
This lines of code are on a Php Linq LinqToObjects example: $names = array("John", "Peter", "Joe", "Patrick", "Donald", "Eric"); echo 'elementAt(2): ' . from('$name')->in($names)->elementAt(2) . "\r\n"; And poduce this error Message: array_shift() expects parameter 1 to be array, string given Filename: PHPLinq/LinqToObjects.php Line Number: 669 Php linkq is old (2009) and maybe don't work fine in my version 5.3.2 How i can fix it?
php
linq
null
null
null
null
open
PHP LINKQ Fails === This lines of code are on a Php Linq LinqToObjects example: $names = array("John", "Peter", "Joe", "Patrick", "Donald", "Eric"); echo 'elementAt(2): ' . from('$name')->in($names)->elementAt(2) . "\r\n"; And poduce this error Message: array_shift() expects parameter 1 to be array, string given Filename: PHPLinq/LinqToObjects.php Line Number: 669 Php linkq is old (2009) and maybe don't work fine in my version 5.3.2 How i can fix it?
0
11,472,125
07/13/2012 14:07:59
240,898
12/30/2009 13:25:21
224
15
Multiple Instances of Control causing buttons to interfere
***A Bit of Background:*** I have been working on a custom data type for Umbraco. The datatype displays a list of nodes of a particular type and allows the user to select from this list. I have attempted to make this data type reusable so that I do not have to create a separate one for each type of node I wish to list. I simply create a property of this data type and set which type of nodes to display. The datatype is an UpdatePanel that contains of a list of checkboxes (for each node to select) and a button to Add/Remove these nodes to and from the selection. As an example, if I have a Post, i can add this datatype and set it to list categories, this allows me to associate the post with a list of categories. If i then want to have another instance of this datatype, say to pick Authors, I start running into issues. ***The Issue*** On loading a node with multiple instances of this datatype, as in the example above, errors occur due to duplicate control ids, I overcame this by appending a random guid to the ids. The problem now is that the buttons to select/deselect the nodes do not appear to be working. I'm assuming it is due to there being multiple instances of these buttons, and getting confused with which event to fire? Is there a way to get around this? To avoid interference across multiple instances of a control? Thanks,
c#
asp-classic
umbraco
custom-data-type
null
null
open
Multiple Instances of Control causing buttons to interfere === ***A Bit of Background:*** I have been working on a custom data type for Umbraco. The datatype displays a list of nodes of a particular type and allows the user to select from this list. I have attempted to make this data type reusable so that I do not have to create a separate one for each type of node I wish to list. I simply create a property of this data type and set which type of nodes to display. The datatype is an UpdatePanel that contains of a list of checkboxes (for each node to select) and a button to Add/Remove these nodes to and from the selection. As an example, if I have a Post, i can add this datatype and set it to list categories, this allows me to associate the post with a list of categories. If i then want to have another instance of this datatype, say to pick Authors, I start running into issues. ***The Issue*** On loading a node with multiple instances of this datatype, as in the example above, errors occur due to duplicate control ids, I overcame this by appending a random guid to the ids. The problem now is that the buttons to select/deselect the nodes do not appear to be working. I'm assuming it is due to there being multiple instances of these buttons, and getting confused with which event to fire? Is there a way to get around this? To avoid interference across multiple instances of a control? Thanks,
0
11,472,416
07/13/2012 14:22:48
949,512
09/16/2011 20:12:33
269
2
UpdatePanel alignment issue inside the Table
I am using UpdatePanel control in the middle of the page for partial postback of Address Type radio button change. Everything works fine but I am struggling with alignment issue. The controls inside the UpdatePanel do not align with outside controls. How could I solve this issue? Please let me know. <table id="tblEdit" class="cssclass1" cellpadding="3" runat="server"> <tr> <td class="cssclass1" align="right"> Title </td> <td> <telerik:RadTextBox ID="textbox1" runat="server" Width="280px" ReadOnly="true" BackColor="LightGray" /> </td> <td align="right"> <asp:Label CssClass="cssclass1" ID="LblFirstName" runat="server">First Name</asp:Label> </td> <td align="left"> <telerik:RadTextBox ID="txtFirstName" runat="server" MaxLength="30"> </telerik:RadTextBox> <asp:Image ID="Image1" ImageUrl="../../../images/requiredfield.gif" AlternateText="Required Field" runat="server"></asp:Image><asp:HiddenField ID="hfCaseEntityId" runat="server" /> </td> </tr> <tr> <td colspan="4"> <asp:UpdatePanel ID="UpdatePanel1" runat="server"> <ContentTemplate> <tr> <td class="cssclass1" align="right"> Address Type </td> <td align="left"> <asp:RadioButtonList ID="AddressType" runat="server" RepeatDirection="Horizontal" OnSelectedIndexChanged="AddressType_SelectedIndexChanged" AutoPostBack="true" > <asp:ListItem Value="1" Selected="True">Home</asp:ListItem> <asp:ListItem Value="2">Work</asp:ListItem> </asp:RadioButtonList> </td> <td class="cssclass1" align="right"> </td> <td align="left"> </td> </tr> <tr> <td align="right"> <asp:Label CssClass="cssclass1" ID="LblHomeStreet1" runat="server">Address</asp:Label> </td> <td align="left"> <telerik:RadTextBox ID="txtHomeStreet1" runat="server" MaxLength="40" > </telerik:RadTextBox> <asp:Image ID="Image10" ImageUrl="../../../images/requiredfield.gif" AlternateText="Required Field" runat="server"></asp:Image> </td> <td align="right"> <asp:Label CssClass="cssclass1" ID="LblHomeStreet2" runat="server">Street 2</asp:Label> </td> <td align="left"> <telerik:RadTextBox ID="txtHomeStreet2" runat="server" MaxLength="40" Width="280px"> </telerik:RadTextBox> </td> </tr> <tr> <td align="right"> <asp:Label CssClass="cssclass1" ID="LblHomeCity" runat="server">City</asp:Label> </td> <td align="left"> <telerik:RadTextBox ID="txtHomeCity" runat="server" MaxLength="30"> </telerik:RadTextBox> </td> <td align="right"> <asp:Label CssClass="cssclass1" ID="LblHomeState" runat="server">State</asp:Label> </td> <td align="left"> <telerik:RadTextBox ID="txtHomeState" runat="server" MaxLength="30"> </telerik:RadTextBox> </td> </tr> </ContentTemplate> </asp:UpdatePanel> </td> </tr> </table>
asp.net
html
asp.net-ajax
updatepanel
null
null
open
UpdatePanel alignment issue inside the Table === I am using UpdatePanel control in the middle of the page for partial postback of Address Type radio button change. Everything works fine but I am struggling with alignment issue. The controls inside the UpdatePanel do not align with outside controls. How could I solve this issue? Please let me know. <table id="tblEdit" class="cssclass1" cellpadding="3" runat="server"> <tr> <td class="cssclass1" align="right"> Title </td> <td> <telerik:RadTextBox ID="textbox1" runat="server" Width="280px" ReadOnly="true" BackColor="LightGray" /> </td> <td align="right"> <asp:Label CssClass="cssclass1" ID="LblFirstName" runat="server">First Name</asp:Label> </td> <td align="left"> <telerik:RadTextBox ID="txtFirstName" runat="server" MaxLength="30"> </telerik:RadTextBox> <asp:Image ID="Image1" ImageUrl="../../../images/requiredfield.gif" AlternateText="Required Field" runat="server"></asp:Image><asp:HiddenField ID="hfCaseEntityId" runat="server" /> </td> </tr> <tr> <td colspan="4"> <asp:UpdatePanel ID="UpdatePanel1" runat="server"> <ContentTemplate> <tr> <td class="cssclass1" align="right"> Address Type </td> <td align="left"> <asp:RadioButtonList ID="AddressType" runat="server" RepeatDirection="Horizontal" OnSelectedIndexChanged="AddressType_SelectedIndexChanged" AutoPostBack="true" > <asp:ListItem Value="1" Selected="True">Home</asp:ListItem> <asp:ListItem Value="2">Work</asp:ListItem> </asp:RadioButtonList> </td> <td class="cssclass1" align="right"> </td> <td align="left"> </td> </tr> <tr> <td align="right"> <asp:Label CssClass="cssclass1" ID="LblHomeStreet1" runat="server">Address</asp:Label> </td> <td align="left"> <telerik:RadTextBox ID="txtHomeStreet1" runat="server" MaxLength="40" > </telerik:RadTextBox> <asp:Image ID="Image10" ImageUrl="../../../images/requiredfield.gif" AlternateText="Required Field" runat="server"></asp:Image> </td> <td align="right"> <asp:Label CssClass="cssclass1" ID="LblHomeStreet2" runat="server">Street 2</asp:Label> </td> <td align="left"> <telerik:RadTextBox ID="txtHomeStreet2" runat="server" MaxLength="40" Width="280px"> </telerik:RadTextBox> </td> </tr> <tr> <td align="right"> <asp:Label CssClass="cssclass1" ID="LblHomeCity" runat="server">City</asp:Label> </td> <td align="left"> <telerik:RadTextBox ID="txtHomeCity" runat="server" MaxLength="30"> </telerik:RadTextBox> </td> <td align="right"> <asp:Label CssClass="cssclass1" ID="LblHomeState" runat="server">State</asp:Label> </td> <td align="left"> <telerik:RadTextBox ID="txtHomeState" runat="server" MaxLength="30"> </telerik:RadTextBox> </td> </tr> </ContentTemplate> </asp:UpdatePanel> </td> </tr> </table>
0
11,472,420
07/13/2012 14:22:54
1,133,324
01/06/2012 00:08:43
49
0
Rally: Team status information not fetching the all the needed information
I have been trying to fetch some information such as username, displayname, role and capacity depending upon iteration. The query returns some of the result for the specified project but not all for the selected iteration. I am not sure what is causing this. You can find my work so far below. function iterationSelected(dropdown, eventArgs) { console.log("HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH"); if(table != null){ table.destroy(); } var queryByUser = { key: "teamDataByUser", type: "User", fetch: 'DisplayName,UserName', query: '(ObjectID > 0)' }; rallyDataSource.findAll(queryByUser, queryTeamInformation); } function queryTeamInformation(results){ console.log(results.teamDataByUser.length); for(var i=0;i<results.teamDataByUser.length;i++){ console.log(results.teamDataByUser[i].UserName + " " + results.teamDataByUser[i].DisplayName); } console.log(iterationDropdown.getSelectedName()); var queryByUserName = { key: "teamData", type: "UserIterationCapacity", project: null, fetch: "Capacity,User,Role,EmailAddress,DisplayName,UserName", query: '((Iteration.Name = ' + '"' + iterationDropdown.getSelectedName() + '") AND (Project = /project/5564891653))' }; rallyDataSource.findAll(queryByUserName, processResults); console.log("GH"); } function processResults(results){ rally.forEach(results.teamData, function(teamData) { console.log(teamData._ref); }); console.log(results.teamData.length); var tableDiv = document.getElementById('table'); var config = { columns: [{key: 'emailaddress', header: 'Team Member Email', width: 200}, {key: 'displayname', header: 'Display name'}, {key: 'username', header: 'User name'}, {key: 'role', header: 'Role'}, {key: 'cap', header: 'Capacity'}] }; if(table != null){ console.log("Got here"); table.destroy(); } table = new rally.sdk.ui.Table(config); for(var i=0;i<results.teamData.length;i++){ var rowInfo = {'emailaddress': results.teamData[i].User.DisplayName, 'displayname': results.teamData[i].User.UserName, 'username': results.teamData[i].User.EmailAddress, 'role' : results.teamData[i].User.Role, 'cap' : results.teamData[i].Capacity}; table.addRow(rowInfo); } table.display(tableDiv); } //======================================================================================================================== /* * Initializes all the page elements */ function initPage() { rallyDataSource = new rally.sdk.data.RallyDataSource('5410787910', '5948174836', 'false', 'true'); var config = { label : "Select an iteration " }; iterationDropdown = new rally.sdk.ui.IterationDropdown(config, rallyDataSource); iterationDropdown.display("aDiv", iterationSelected); } rally.addOnLoad(initPage);
javascript
query
rally
null
null
null
open
Rally: Team status information not fetching the all the needed information === I have been trying to fetch some information such as username, displayname, role and capacity depending upon iteration. The query returns some of the result for the specified project but not all for the selected iteration. I am not sure what is causing this. You can find my work so far below. function iterationSelected(dropdown, eventArgs) { console.log("HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH"); if(table != null){ table.destroy(); } var queryByUser = { key: "teamDataByUser", type: "User", fetch: 'DisplayName,UserName', query: '(ObjectID > 0)' }; rallyDataSource.findAll(queryByUser, queryTeamInformation); } function queryTeamInformation(results){ console.log(results.teamDataByUser.length); for(var i=0;i<results.teamDataByUser.length;i++){ console.log(results.teamDataByUser[i].UserName + " " + results.teamDataByUser[i].DisplayName); } console.log(iterationDropdown.getSelectedName()); var queryByUserName = { key: "teamData", type: "UserIterationCapacity", project: null, fetch: "Capacity,User,Role,EmailAddress,DisplayName,UserName", query: '((Iteration.Name = ' + '"' + iterationDropdown.getSelectedName() + '") AND (Project = /project/5564891653))' }; rallyDataSource.findAll(queryByUserName, processResults); console.log("GH"); } function processResults(results){ rally.forEach(results.teamData, function(teamData) { console.log(teamData._ref); }); console.log(results.teamData.length); var tableDiv = document.getElementById('table'); var config = { columns: [{key: 'emailaddress', header: 'Team Member Email', width: 200}, {key: 'displayname', header: 'Display name'}, {key: 'username', header: 'User name'}, {key: 'role', header: 'Role'}, {key: 'cap', header: 'Capacity'}] }; if(table != null){ console.log("Got here"); table.destroy(); } table = new rally.sdk.ui.Table(config); for(var i=0;i<results.teamData.length;i++){ var rowInfo = {'emailaddress': results.teamData[i].User.DisplayName, 'displayname': results.teamData[i].User.UserName, 'username': results.teamData[i].User.EmailAddress, 'role' : results.teamData[i].User.Role, 'cap' : results.teamData[i].Capacity}; table.addRow(rowInfo); } table.display(tableDiv); } //======================================================================================================================== /* * Initializes all the page elements */ function initPage() { rallyDataSource = new rally.sdk.data.RallyDataSource('5410787910', '5948174836', 'false', 'true'); var config = { label : "Select an iteration " }; iterationDropdown = new rally.sdk.ui.IterationDropdown(config, rallyDataSource); iterationDropdown.display("aDiv", iterationSelected); } rally.addOnLoad(initPage);
0
11,472,425
07/13/2012 14:23:18
968,751
09/28/2011 09:19:55
1
0
Usage Twitter Stream api for search
i`m trying use Twitter Stream Api for searching some hashtags in Google Spreadsheet. Twitter search api useless cause i wanna trak retweet count too. My function sample here. Can anybody explain me what i must do for working well.. function miniSearch(){ var ss = SpreadsheetApp.getActiveSpreadsheet(); var sumSheet = ss.getSheetByName("Readme/Settings"); // Authorize to Twitter var oauthConfig = UrlFetchApp.addOAuthService("twitter"); oauthConfig.setAccessTokenUrl("https://api.twitter.com/oauth/access_token"); oauthConfig.setRequestTokenUrl("https://api.twitter.com/oauth/request_token"); oauthConfig.setAuthorizationUrl("https://api.twitter.com/oauth/authorize"); oauthConfig.setConsumerKey(TWITTER_CONSUMER_KEY); oauthConfig.setConsumerSecret(TWITTER_CONSUMER_SECRET); // "twitter" value must match the argument to "addOAuthService" above. var options = { 'method': 'POST', "oAuthServiceName" : "twitter", "oAuthUseToken" : "always" }; var url = "https://stream.twitter.com/1/statuses/filter.json?track="+"twitterapi"; var response = UrlFetchApp.fetch(url, options); var tweets = JSON.parse(response.getContentText()); sumSheet.getRange('B8').setValue(tweets[0]["text"]); } this function return error code 504;
twitter-api
twitter-oauth
google-apps-script
google-spreadsheet
null
null
open
Usage Twitter Stream api for search === i`m trying use Twitter Stream Api for searching some hashtags in Google Spreadsheet. Twitter search api useless cause i wanna trak retweet count too. My function sample here. Can anybody explain me what i must do for working well.. function miniSearch(){ var ss = SpreadsheetApp.getActiveSpreadsheet(); var sumSheet = ss.getSheetByName("Readme/Settings"); // Authorize to Twitter var oauthConfig = UrlFetchApp.addOAuthService("twitter"); oauthConfig.setAccessTokenUrl("https://api.twitter.com/oauth/access_token"); oauthConfig.setRequestTokenUrl("https://api.twitter.com/oauth/request_token"); oauthConfig.setAuthorizationUrl("https://api.twitter.com/oauth/authorize"); oauthConfig.setConsumerKey(TWITTER_CONSUMER_KEY); oauthConfig.setConsumerSecret(TWITTER_CONSUMER_SECRET); // "twitter" value must match the argument to "addOAuthService" above. var options = { 'method': 'POST', "oAuthServiceName" : "twitter", "oAuthUseToken" : "always" }; var url = "https://stream.twitter.com/1/statuses/filter.json?track="+"twitterapi"; var response = UrlFetchApp.fetch(url, options); var tweets = JSON.parse(response.getContentText()); sumSheet.getRange('B8').setValue(tweets[0]["text"]); } this function return error code 504;
0
11,472,428
07/13/2012 14:23:25
1,494,934
07/02/2012 00:46:30
1
1
issuedTokenAuthentication audienceUriMode=”Never”
I had migrated wcf 3.5 to 4.0 and I had the following error: "An error occurred when processing the security tokens in the message" A google search lead me to this post: http://blog.latamhub.com/?cat=3 So, I added the following line and the problem was fixed: <issuedTokenAuthentication audienceUriMode=”Never”> </issuedTokenAuthentication> I'm not sure what does it do. I'm using wsFederationHttpBinding. Does anyone know why it works now? In wcf 3.5 is a default value and in 4.0 is not?
c#
wcf
.net-4.0
migrate
ws-federation
null
open
issuedTokenAuthentication audienceUriMode=”Never” === I had migrated wcf 3.5 to 4.0 and I had the following error: "An error occurred when processing the security tokens in the message" A google search lead me to this post: http://blog.latamhub.com/?cat=3 So, I added the following line and the problem was fixed: <issuedTokenAuthentication audienceUriMode=”Never”> </issuedTokenAuthentication> I'm not sure what does it do. I'm using wsFederationHttpBinding. Does anyone know why it works now? In wcf 3.5 is a default value and in 4.0 is not?
0
11,472,430
07/13/2012 14:23:30
1,360,869
04/27/2012 10:07:02
1
0
retriving data from aggregate function in the view itself in django
i have the following code and i need to retrieve the average data in the django view itself but always the variable average isn't defined any ideas ?? cont_rating_tmp = EmployerReviewContractor.objects.filter(reviewed__id = cont.id).aggregate(average=Avg('avg_rate')) cont.rate=average
python
django
django-views
null
null
null
open
retriving data from aggregate function in the view itself in django === i have the following code and i need to retrieve the average data in the django view itself but always the variable average isn't defined any ideas ?? cont_rating_tmp = EmployerReviewContractor.objects.filter(reviewed__id = cont.id).aggregate(average=Avg('avg_rate')) cont.rate=average
0
11,472,431
07/13/2012 14:23:31
1,486,259
06/27/2012 16:03:01
6
0
Matching values NOT in domain values of DQS SQL 2012
All, I am using SQL Server 2012 Data Quality Services. I would like to consider any value that does not exist under domain values as Invalid. For example, if I have the values of 'abc', 'def' listed as correct in my domain values tab under domain management within a knowledge base but any value outside should be considered INVALID. I have tried setting a domain rule that uses "Value is not in" then manually typed in the values 'abc', and 'def' but don't get an INVALID result when I cleanse data that has a domain value of 'xyz'. Is there a better method within DQS that will allow me to consider any values outside of the values listed under domain values as INVALID? Thanks for any help.
sql-server
data-quality
data-quality-services
null
null
null
open
Matching values NOT in domain values of DQS SQL 2012 === All, I am using SQL Server 2012 Data Quality Services. I would like to consider any value that does not exist under domain values as Invalid. For example, if I have the values of 'abc', 'def' listed as correct in my domain values tab under domain management within a knowledge base but any value outside should be considered INVALID. I have tried setting a domain rule that uses "Value is not in" then manually typed in the values 'abc', and 'def' but don't get an INVALID result when I cleanse data that has a domain value of 'xyz'. Is there a better method within DQS that will allow me to consider any values outside of the values listed under domain values as INVALID? Thanks for any help.
0
11,472,432
07/13/2012 14:23:33
1,512,906
07/09/2012 19:06:19
3
0
How can I get Eclipse to recognize the most recent Hadoop libraries?
This question is more of an Eclipse question, but those who have worked with Hadoop may know the answer. Last year, I wrote some Hadoop MapReduce jobs in Eclipse. To access the libraries and packages I needed to compile the code, I installed an Eclipse plug-in off the Apache website (http://wiki.apache.org/hadoop/EclipsePlugIn). Unfortunately, that plug-in isn’t compatible with the latest version of Hadoop (the 2.0.0-alpha version). I was wondering if anyone had done any work with writing Hadoop jobs within the past few months and knows how I can get Eclipse to recognize the most recent Hadoop (2.0.0-alpha) packages? The plug-in still works for Hadoop 0.20.203.0, but I was hoping to be able to use the newest version. I'm running Eclipse in Windows. I tried right-clicking on the name of my project, going to "Properties," then to "Java Build Path," and finally selecting "Add External JARs." I added all the JARs from the hadoop-2.0.0-alpha/share/hadoop directory and subdirectories. At first, I thought this had worked, but when I try to use methods and constructors unique to the Hadoop 2.0.0-alpha API, the code does not compile. The libraries it is recognizing are definitely more recent than those from Hadoop 0.20.203.0, but not as recent as the current alpha version of Hadoop. Does anyone know how I can fix this problem? Thanks!
java
eclipse
hadoop
mapreduce
hdfs
null
open
How can I get Eclipse to recognize the most recent Hadoop libraries? === This question is more of an Eclipse question, but those who have worked with Hadoop may know the answer. Last year, I wrote some Hadoop MapReduce jobs in Eclipse. To access the libraries and packages I needed to compile the code, I installed an Eclipse plug-in off the Apache website (http://wiki.apache.org/hadoop/EclipsePlugIn). Unfortunately, that plug-in isn’t compatible with the latest version of Hadoop (the 2.0.0-alpha version). I was wondering if anyone had done any work with writing Hadoop jobs within the past few months and knows how I can get Eclipse to recognize the most recent Hadoop (2.0.0-alpha) packages? The plug-in still works for Hadoop 0.20.203.0, but I was hoping to be able to use the newest version. I'm running Eclipse in Windows. I tried right-clicking on the name of my project, going to "Properties," then to "Java Build Path," and finally selecting "Add External JARs." I added all the JARs from the hadoop-2.0.0-alpha/share/hadoop directory and subdirectories. At first, I thought this had worked, but when I try to use methods and constructors unique to the Hadoop 2.0.0-alpha API, the code does not compile. The libraries it is recognizing are definitely more recent than those from Hadoop 0.20.203.0, but not as recent as the current alpha version of Hadoop. Does anyone know how I can fix this problem? Thanks!
0
11,660,520
07/26/2012 00:06:40
1,440,565
06/06/2012 18:45:04
839
42
Analysing the runtime efficiency of a Haskell function
I have the following solution in Haskell to [Problem 3](http://projecteuler.net/problem=3): isPrime :: Integer -> Bool isPrime p = (divisors p) == [1, p] divisors :: Integer -> [Integer] divisors n = [d | d <- [1..n], n `mod` d == 0] main = print (head (filter isPrime (filter ((==0) . (n `mod`)) [n-1,n-2..]))) where n = 600851475143 However, it takes more than the minute limit given by Project Euler. So how do I analyze the run-time efficiency of my code to determine where I need to make changes? **Note:** Please do **not** post solutions. I want to figure it out on my own. I'm just stuck at a point where I could use some pointers to help me along. Thanks!
performance
optimization
haskell
project-euler
null
null
open
Analysing the runtime efficiency of a Haskell function === I have the following solution in Haskell to [Problem 3](http://projecteuler.net/problem=3): isPrime :: Integer -> Bool isPrime p = (divisors p) == [1, p] divisors :: Integer -> [Integer] divisors n = [d | d <- [1..n], n `mod` d == 0] main = print (head (filter isPrime (filter ((==0) . (n `mod`)) [n-1,n-2..]))) where n = 600851475143 However, it takes more than the minute limit given by Project Euler. So how do I analyze the run-time efficiency of my code to determine where I need to make changes? **Note:** Please do **not** post solutions. I want to figure it out on my own. I'm just stuck at a point where I could use some pointers to help me along. Thanks!
0
11,660,593
07/26/2012 00:16:56
888,958
08/10/2011 23:52:56
333
8
C++ STL map not recognizing key
I have this code, CBString is just a string class I use for some processing char * scrummyconfigure::dosub(strtype input) { CBString tstring; tstring = input; uint begin; uint end; begin = tstring.findchr('$'); end = tstring.findchr('}',begin); CBString k = tstring.midstr(begin+2,end-2); // this is BASE strtype vname = (strtype) ((const unsigned char*)k); strtype bvar = (strtype) "BASE"; assert(strcmp(bvar,vname) == 0); // this never fails // theconf is just a struct with the map subvars // subvars is a map<const char *, const char *> out(theconf->subvars[bvar]); // always comes up with the value out(theconf->subvars[vname]); // always empty uint size = end - begin; tstring.remove(begin, size); return (const char *)tstring; // it's OKAY! it's got an overload that does things correctly } Why is it that the strcmp always says the strings are the same, but only the variable I declared as bvar returns anything?
c++
stl
map
null
null
null
open
C++ STL map not recognizing key === I have this code, CBString is just a string class I use for some processing char * scrummyconfigure::dosub(strtype input) { CBString tstring; tstring = input; uint begin; uint end; begin = tstring.findchr('$'); end = tstring.findchr('}',begin); CBString k = tstring.midstr(begin+2,end-2); // this is BASE strtype vname = (strtype) ((const unsigned char*)k); strtype bvar = (strtype) "BASE"; assert(strcmp(bvar,vname) == 0); // this never fails // theconf is just a struct with the map subvars // subvars is a map<const char *, const char *> out(theconf->subvars[bvar]); // always comes up with the value out(theconf->subvars[vname]); // always empty uint size = end - begin; tstring.remove(begin, size); return (const char *)tstring; // it's OKAY! it's got an overload that does things correctly } Why is it that the strcmp always says the strings are the same, but only the variable I declared as bvar returns anything?
0
11,660,600
07/26/2012 00:17:31
1,118,919
12/28/2011 08:04:43
865
30
How to style the children Views from the parent View?
I am currently trying to get the look of my app right. But I am having problems figuring out how to even set up a way to change themes. For one thing, is there even a way to change styles through code? I checked the method list and I saw nothing. This leads me to my actual question; is there a way that, like CSS, in which you style the parent, and then have it trickle down but also changed depending on the View? I looked at the Android docs, and they did not show any examples of this. Hopefully someone can give me an idea as to how to accomplish this, or if its not possible, to let me know that as well. Thanks in advance.
android
android-layout
android-stylesheeets
null
null
null
open
How to style the children Views from the parent View? === I am currently trying to get the look of my app right. But I am having problems figuring out how to even set up a way to change themes. For one thing, is there even a way to change styles through code? I checked the method list and I saw nothing. This leads me to my actual question; is there a way that, like CSS, in which you style the parent, and then have it trickle down but also changed depending on the View? I looked at the Android docs, and they did not show any examples of this. Hopefully someone can give me an idea as to how to accomplish this, or if its not possible, to let me know that as well. Thanks in advance.
0
11,660,601
07/26/2012 00:17:36
1,431,804
06/02/2012 00:23:30
40
0
python version 2.3 substitution for Queue.Queue.task_done()
I found a piece of code online demoing Queued multithreading in Python. <http://code.activestate.com/recipes/577187-python-thread-pool/> I Tried it, it seems to work. Except I'm running python version 2.3. After a thread completes it complains for have no attribute 'task_done' 'join' I googled around and found Queue.task_done() and Queue.join() come with version 2.5 or later. What's my best option in this case? FYI: I tried commenting out line 17: self.tasks.task_done() It looks like the code can run to completion except seeing this error after each thread completes self.tasks.join() AttributeError: Queue instance has no attribute 'join' I used 'top' to check the number of thread the program starts is exactly what I specified. After the program finishes, the Linux shell become unresponsive.
python
multithreading
queue
null
null
null
open
python version 2.3 substitution for Queue.Queue.task_done() === I found a piece of code online demoing Queued multithreading in Python. <http://code.activestate.com/recipes/577187-python-thread-pool/> I Tried it, it seems to work. Except I'm running python version 2.3. After a thread completes it complains for have no attribute 'task_done' 'join' I googled around and found Queue.task_done() and Queue.join() come with version 2.5 or later. What's my best option in this case? FYI: I tried commenting out line 17: self.tasks.task_done() It looks like the code can run to completion except seeing this error after each thread completes self.tasks.join() AttributeError: Queue instance has no attribute 'join' I used 'top' to check the number of thread the program starts is exactly what I specified. After the program finishes, the Linux shell become unresponsive.
0
11,660,603
07/26/2012 00:17:46
414,345
08/08/2010 12:56:26
769
50
How do I request Android tool documentation to be updated?
I've been using the Android draw9patch tool and I noticed in a recent update that there is a new feature. I posted a SO question here asking what the new feature was, but no answer was given. http://stackoverflow.com/questions/11406521/android-9-patch-tool-what-is-the-new-layout-bounds-feature/ I've looked at the draw9patch tool documentation and there is no mention of the new feature. http://developer.android.com/tools/help/draw9patch.html I want to make a request to get the documentation updated but I'm not sure where. Does anyone know where I can make this request?
android
nine-patch
null
null
null
07/27/2012 09:28:15
off topic
How do I request Android tool documentation to be updated? === I've been using the Android draw9patch tool and I noticed in a recent update that there is a new feature. I posted a SO question here asking what the new feature was, but no answer was given. http://stackoverflow.com/questions/11406521/android-9-patch-tool-what-is-the-new-layout-bounds-feature/ I've looked at the draw9patch tool documentation and there is no mention of the new feature. http://developer.android.com/tools/help/draw9patch.html I want to make a request to get the documentation updated but I'm not sure where. Does anyone know where I can make this request?
2
11,660,604
07/26/2012 00:17:57
1,424,802
05/29/2012 22:31:35
314
19
:css3-container XPath Selector
I have the following line of code in an html file, I have no idea what is is and why there is a : infront. However, I am processing the DOM and want to remove all similar nodes using an xpath selector. I can't seem to be able to use "//:css-container" to select the element. <:css3-container style="z-index: 3000; position: absolute; direction: ltr; top: 92px; left: -9998px;"> Any ideas?
c#
javascript
html
xpath
null
null
open
:css3-container XPath Selector === I have the following line of code in an html file, I have no idea what is is and why there is a : infront. However, I am processing the DOM and want to remove all similar nodes using an xpath selector. I can't seem to be able to use "//:css-container" to select the element. <:css3-container style="z-index: 3000; position: absolute; direction: ltr; top: 92px; left: -9998px;"> Any ideas?
0
11,660,605
07/26/2012 00:18:01
1,261,831
03/11/2012 03:58:29
44
0
Python - Overwriting Folder If It Already Exists
dir = 'C:\Users\Shankar\Documents\Other' if not os.path.exists(dir): os.makedirs(dir) Here is some code I found that allows me to create a directory if it does not already exist. The folder will be used by a program to write text files into that folder. But I want to start with a brand new, empty folder next time my program opens up. Is there a way to overwrite the folder (and create a new one, with the same name) if it already exists? Thanks!
python
text-files
folder
overwrite
creating
null
open
Python - Overwriting Folder If It Already Exists === dir = 'C:\Users\Shankar\Documents\Other' if not os.path.exists(dir): os.makedirs(dir) Here is some code I found that allows me to create a directory if it does not already exist. The folder will be used by a program to write text files into that folder. But I want to start with a brand new, empty folder next time my program opens up. Is there a way to overwrite the folder (and create a new one, with the same name) if it already exists? Thanks!
0
11,660,610
07/26/2012 00:18:36
1,419,201
05/26/2012 15:55:31
30
3
Retrieve radiobuttons from the child div within the main div
I have the following html.. 1 main div having 2 child divs. I need to loop through both the divs and retrieve the checked radiobutton in each. e.g.: 1st child div has maybe checked while 2nd div has wright checked, i need to retrieve both their values. How do i go about it <DIV> <DIV> <TABLE> <TBODY> <TR> <TD> wrong<INPUT class=XX disabled value=wrong type=radio name=radiobutton> wright<INPUT class=XX disabled value=wright type=radio name=radiobutton> maybe<INPUT class=XX value=maybe CHECKED type=radio name=radiobutton ></TD> </TR></TBODY></TABLE> </DIV> <DIV> <TABLE><TBODY><TR> <TD> wrong<INPUT class=XX CHECKED value=wrong type=radio name=radiobutton> wright<INPUT class=XX value=wright type=radio name=radiobutton> maybe<INPUT class=XX value=maybe type=radio name=radiobutton ></TD> </TR></TBODY></TABLE> </DIV> </DIV>
javascript
jquery
html
null
null
null
open
Retrieve radiobuttons from the child div within the main div === I have the following html.. 1 main div having 2 child divs. I need to loop through both the divs and retrieve the checked radiobutton in each. e.g.: 1st child div has maybe checked while 2nd div has wright checked, i need to retrieve both their values. How do i go about it <DIV> <DIV> <TABLE> <TBODY> <TR> <TD> wrong<INPUT class=XX disabled value=wrong type=radio name=radiobutton> wright<INPUT class=XX disabled value=wright type=radio name=radiobutton> maybe<INPUT class=XX value=maybe CHECKED type=radio name=radiobutton ></TD> </TR></TBODY></TABLE> </DIV> <DIV> <TABLE><TBODY><TR> <TD> wrong<INPUT class=XX CHECKED value=wrong type=radio name=radiobutton> wright<INPUT class=XX value=wright type=radio name=radiobutton> maybe<INPUT class=XX value=maybe type=radio name=radiobutton ></TD> </TR></TBODY></TABLE> </DIV> </DIV>
0
11,567,903
07/19/2012 19:26:09
1,520,692
07/12/2012 11:56:24
6
0
how do I clear the selection choices with jquery ui autocomplete?
I'm using jquery-ui-1.8.21 autocomplete and having it retrieve data from a DB. Now I have two quesions - I've searched the web but nothing answers my question - it's retrieving a list of zip codes, but when one is selected from the choices, the list of choices/selections/menu remains on screen. How do I get the list to clear/disappear when selected by enter key or better by mouse click? here's my jquery code: $(document).ready(function() { $("#container").hide(); $("#autocomplete").val(""); $("#autocomplete").focus(); $("#autocomplete").autocomplete({ autoFocus: true, source: "search.php", minLength: 2, //search after two characters //change: function(event, ui) { ... } select: function(event, ui) { //do something $("#autocomplete").val(ui.item.autocomplete); $("#container").hide().fadeIn(3000); } }); }); My next question is - how can I restrict the choices to match only from front to back? For example, I start typing 55 and get all zip codes beginning with 55, but also any zip codes with 55 like 50055. Thanks in advance for your help! Robert
jquery
jquery-ui-autocomplete
null
null
null
null
open
how do I clear the selection choices with jquery ui autocomplete? === I'm using jquery-ui-1.8.21 autocomplete and having it retrieve data from a DB. Now I have two quesions - I've searched the web but nothing answers my question - it's retrieving a list of zip codes, but when one is selected from the choices, the list of choices/selections/menu remains on screen. How do I get the list to clear/disappear when selected by enter key or better by mouse click? here's my jquery code: $(document).ready(function() { $("#container").hide(); $("#autocomplete").val(""); $("#autocomplete").focus(); $("#autocomplete").autocomplete({ autoFocus: true, source: "search.php", minLength: 2, //search after two characters //change: function(event, ui) { ... } select: function(event, ui) { //do something $("#autocomplete").val(ui.item.autocomplete); $("#container").hide().fadeIn(3000); } }); }); My next question is - how can I restrict the choices to match only from front to back? For example, I start typing 55 and get all zip codes beginning with 55, but also any zip codes with 55 like 50055. Thanks in advance for your help! Robert
0
11,567,904
07/19/2012 19:26:10
843,580
07/13/2011 21:47:57
116
4
high scalability, what is it and good resource or book
I am having hard time find a good resource for high scalability. Meaning how do scale applications or infrastructure etc. The website http://highscalability.com/ used to have some good posts but not anymore. What I mean looking for is, if you a web app, a mobile app or enterprise app based either on JEE or LAMP or Ruby on Rails etc. How do you scale from say 1k users to 1 million users. How do you scale your infrastructure to handle millions and billions of transactions etc. Please reply and your help will be appreciated.
cloud
scalability
bigdata
null
null
07/20/2012 17:11:34
not constructive
high scalability, what is it and good resource or book === I am having hard time find a good resource for high scalability. Meaning how do scale applications or infrastructure etc. The website http://highscalability.com/ used to have some good posts but not anymore. What I mean looking for is, if you a web app, a mobile app or enterprise app based either on JEE or LAMP or Ruby on Rails etc. How do you scale from say 1k users to 1 million users. How do you scale your infrastructure to handle millions and billions of transactions etc. Please reply and your help will be appreciated.
4
11,567,710
07/19/2012 19:11:49
1,521,973
07/12/2012 20:28:17
1
0
numpy.linalg.lstsq convergence
I have a question concerning NumPy module linalg.lstsq(a,b). There is any possibility to check how fast this method is finding convergence? I mean some of characteristics which indicate how fast computation is going to convergence? Thank you in advanced for brain storm.
numpy
null
null
null
null
null
open
numpy.linalg.lstsq convergence === I have a question concerning NumPy module linalg.lstsq(a,b). There is any possibility to check how fast this method is finding convergence? I mean some of characteristics which indicate how fast computation is going to convergence? Thank you in advanced for brain storm.
0
11,567,913
07/19/2012 19:27:01
523,640
11/29/2010 08:18:09
357
1
Using mozilla cacert.pem file, error: unable to get local issuer certificate
I have a program using libcurl but I am getting an error: * successfully set certificate verify locations: * CAfile: c:\MinGW_New\ssl\misc\demoCA\cacert.pem CApath: none * SSL certificate problem: unable to get local issuer certificate * Closing connection #0`enter code here` I tried to append the mozilla certificates from the http://curl.haxx.se/ca/cacert.pem file but I still get the same error. Any idea what I am doing wrong? I set the CAINFO option in curl to the correct path to my mozilla certificate. That part is verified working. Do I need to sign my mozilla pem file? Im using openssl, how do you do this?
curl
openssl
libcurl
null
null
null
open
Using mozilla cacert.pem file, error: unable to get local issuer certificate === I have a program using libcurl but I am getting an error: * successfully set certificate verify locations: * CAfile: c:\MinGW_New\ssl\misc\demoCA\cacert.pem CApath: none * SSL certificate problem: unable to get local issuer certificate * Closing connection #0`enter code here` I tried to append the mozilla certificates from the http://curl.haxx.se/ca/cacert.pem file but I still get the same error. Any idea what I am doing wrong? I set the CAINFO option in curl to the correct path to my mozilla certificate. That part is verified working. Do I need to sign my mozilla pem file? Im using openssl, how do you do this?
0
11,567,256
07/19/2012 18:40:24
1,118,038
12/27/2011 17:28:16
312
29
Connect a Rails application to microsoft access
I have a client which want to have data from a form to an access database. I seen some odbc connector for rails but it's only old projects. I can export/inport data in CSV but I want the simpler solution. Do you know if there is a solution to connect Rails with Access? Thanks!
ruby-on-rails
ms-access
null
null
null
null
open
Connect a Rails application to microsoft access === I have a client which want to have data from a form to an access database. I seen some odbc connector for rails but it's only old projects. I can export/inport data in CSV but I want the simpler solution. Do you know if there is a solution to connect Rails with Access? Thanks!
0
11,567,257
07/19/2012 18:40:27
629,709
02/23/2011 07:07:24
22
0
Images being duplicated in IE9?
Internet Explorer 9 is rendering [my webpage][1] incorrectly, and I'm not sure why. It's duplicating each thumbnail, with one showing the fade-in effect, and the other the magnifying-glass image. Correct functionality can be seen in Chrome and Firefox (versions 21.0.1180.49 and 14.0.1 respectively). Can anyone suggest why this might be happening? CSS is [here][2]. Thanks! [1]: http://element17.com/ [2]: http://element17.com/css/main.css
html
css
internet-explorer
internet-explorer-9
null
null
open
Images being duplicated in IE9? === Internet Explorer 9 is rendering [my webpage][1] incorrectly, and I'm not sure why. It's duplicating each thumbnail, with one showing the fade-in effect, and the other the magnifying-glass image. Correct functionality can be seen in Chrome and Firefox (versions 21.0.1180.49 and 14.0.1 respectively). Can anyone suggest why this might be happening? CSS is [here][2]. Thanks! [1]: http://element17.com/ [2]: http://element17.com/css/main.css
0
11,567,915
07/19/2012 19:27:27
1,090,447
12/09/2011 20:15:04
33
1
Jqgrid: strange behavior when multiselect on different pages
Simple question, hard to find an answer: If I try to select a row programmatically, I use this: $('#grid').jqGrid('setSelection', rowId); The problem is that it only selects rows on current visible page. If *rowId* is on another page, it will not be selected. More info: My goal is to select multiple rows (spread on multiple pages) when page loads for the first time. Thanks, Rafael PS: This guy has the same problem. No answer yet: http://stackoverflow.com/questions/4710780/jqgrid-multiselect-only-selects-rows-on-the-current-page-if-paging-is-enabled
jqgrid
paging
multi-select
null
null
null
open
Jqgrid: strange behavior when multiselect on different pages === Simple question, hard to find an answer: If I try to select a row programmatically, I use this: $('#grid').jqGrid('setSelection', rowId); The problem is that it only selects rows on current visible page. If *rowId* is on another page, it will not be selected. More info: My goal is to select multiple rows (spread on multiple pages) when page loads for the first time. Thanks, Rafael PS: This guy has the same problem. No answer yet: http://stackoverflow.com/questions/4710780/jqgrid-multiselect-only-selects-rows-on-the-current-page-if-paging-is-enabled
0
11,567,917
07/19/2012 19:27:30
1,434,416
06/04/2012 05:11:56
26
0
looking for a forix alert candlestick specific chart
i am looking for a specefic alert chart for the last two days. i dont know its name but i attached its picture so that may any one after just see the picture could tell me the name and also the source of that file from where i could get it and use it in my website. The basic idea is that when i click any where in the chart it give the value of the point(price) i clicked, in the above text field labeled price. ![forexchart](http://i.stack.imgur.com/ov5Ra.jpg)
candlestick-chart
null
null
null
null
null
open
looking for a forix alert candlestick specific chart === i am looking for a specefic alert chart for the last two days. i dont know its name but i attached its picture so that may any one after just see the picture could tell me the name and also the source of that file from where i could get it and use it in my website. The basic idea is that when i click any where in the chart it give the value of the point(price) i clicked, in the above text field labeled price. ![forexchart](http://i.stack.imgur.com/ov5Ra.jpg)
0
11,567,918
07/19/2012 19:27:32
1,476,248
06/23/2012 02:03:33
21
0
How can you use CASE Statements to assign values to matches in your query?
**Let's say your running a query and you have a lot of different user inputs that may not find an exact match. Now would it be possible to do something like the following?** $query = "SELECT *, CASE matchingValues WHEN $field1 LIKE '$a' THEN value = '1' ELSE value = '0' WHEN $field2 LIKE '$b' THEN value = '1' ELSE value = '0' WHEN $field3 LIKE '$c' THEN value = '1' ELSE value = '0' WHEN $field4 LIKE '$d' THEN value = '1' ELSE value = '0' WHEN $field5 LIKE '$e' THEN value = '1' ELSE value = '0' END AS score FROM . $usertable WHERE $field1 LIKE '$a' AND $field2 LIKE '$b' AND $field3 LIKE '$c' AND $field4 LIKE '$d' AND $field5 LIKE '$d' ORDER BY score DESC"; if($result = mysql_query($query)) { if(mysql_num-rows($result)==NULL) { echo 'No Results Found'; }else{ ....
php
mysql
query
case
mysql-num-rows
null
open
How can you use CASE Statements to assign values to matches in your query? === **Let's say your running a query and you have a lot of different user inputs that may not find an exact match. Now would it be possible to do something like the following?** $query = "SELECT *, CASE matchingValues WHEN $field1 LIKE '$a' THEN value = '1' ELSE value = '0' WHEN $field2 LIKE '$b' THEN value = '1' ELSE value = '0' WHEN $field3 LIKE '$c' THEN value = '1' ELSE value = '0' WHEN $field4 LIKE '$d' THEN value = '1' ELSE value = '0' WHEN $field5 LIKE '$e' THEN value = '1' ELSE value = '0' END AS score FROM . $usertable WHERE $field1 LIKE '$a' AND $field2 LIKE '$b' AND $field3 LIKE '$c' AND $field4 LIKE '$d' AND $field5 LIKE '$d' ORDER BY score DESC"; if($result = mysql_query($query)) { if(mysql_num-rows($result)==NULL) { echo 'No Results Found'; }else{ ....
0
11,650,939
07/25/2012 13:33:20
1,551,749
07/25/2012 13:22:05
1
0
How and when does mediawiki create and upload files?
I'm now busy with my first mediawiki project and I have to connect it to a Swift (CDN) service. I've dropped the regular one (which is specifically for rackspace - we have our own), and built one around our own wrapper - thus far no problem. Except now mediawiki doesn't create the thumbnails automatically. Maybe something stupid, but I've been cracking my brains and just can find the solution... This is a part of the config (I can't reveal everything - confidentiality and everything :P): <code> $wgFileBackends[] = array( 'lockManager' => 'nullLockManager', 'shardViaHashLevels' => array( 'remote-public' => array( 'levels' => 1, 'base' => 36, 'repeat' => false ), 'remote-thumb' => array( 'levels' => 1, 'base' => 36, 'repeat' => false ), 'local-thumb' => array( 'levels' => 1, 'base' => 36, 'repeat' => false ), 'remote-archive' => array( 'levels' => 1, 'base' => 36, 'repeat' => false ), 'local-deleted' => array( 'levels' => 1, 'base' => 36, 'repeat' => false ), 'remote-deleted' => array( 'levels' => 1, 'base' => 36, 'repeat' => false ), ) ); </code> I probably don't even have that right...
php
mediawiki
cdn
swift
null
null
open
How and when does mediawiki create and upload files? === I'm now busy with my first mediawiki project and I have to connect it to a Swift (CDN) service. I've dropped the regular one (which is specifically for rackspace - we have our own), and built one around our own wrapper - thus far no problem. Except now mediawiki doesn't create the thumbnails automatically. Maybe something stupid, but I've been cracking my brains and just can find the solution... This is a part of the config (I can't reveal everything - confidentiality and everything :P): <code> $wgFileBackends[] = array( 'lockManager' => 'nullLockManager', 'shardViaHashLevels' => array( 'remote-public' => array( 'levels' => 1, 'base' => 36, 'repeat' => false ), 'remote-thumb' => array( 'levels' => 1, 'base' => 36, 'repeat' => false ), 'local-thumb' => array( 'levels' => 1, 'base' => 36, 'repeat' => false ), 'remote-archive' => array( 'levels' => 1, 'base' => 36, 'repeat' => false ), 'local-deleted' => array( 'levels' => 1, 'base' => 36, 'repeat' => false ), 'remote-deleted' => array( 'levels' => 1, 'base' => 36, 'repeat' => false ), ) ); </code> I probably don't even have that right...
0