question_id int64 4 6.31M | answer_id int64 7 6.31M | title stringlengths 9 150 | question_body stringlengths 0 28.8k | answer_body stringlengths 60 27.2k | question_text stringlengths 40 28.9k | combined_text stringlengths 124 39.6k | tags listlengths 1 6 | question_score int64 0 26.3k | answer_score int64 0 28.8k | view_count int64 15 14M | answer_count int64 0 182 | favorite_count int64 0 32 | question_creation_date stringdate 2008-07-31 21:42:52 2011-06-10 18:12:18 | answer_creation_date stringdate 2008-07-31 22:17:57 2011-06-10 18:14:17 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6,191,613 | 6,192,056 | Getting "Syntax error in INSERT INTO" for Append Query in VBA (Access 2002) | I am getting a "Syntax error in INSERT INTO" when I try to run an append query. I'm making a database to make it easier on production operators; capturing some of the data by hand-held scanners. I've been looking around to see if anybody has had a problem like this. I've seen some that were close, but when I've made th... | Trying to run the DoCmd.RunSQL is when the error occurs. As far as I can tell the code, and SQL looks correct. Your code calls DoCmd.RunSQL twice. Do you get errors from both, or only the second time? I suggest you ditch DoCmd.RunSQL in favor of: Dim db As DAO.Database Set db = Currentdb db.Execute strSQL, dbFailonerro... | Getting "Syntax error in INSERT INTO" for Append Query in VBA (Access 2002) I am getting a "Syntax error in INSERT INTO" when I try to run an append query. I'm making a database to make it easier on production operators; capturing some of the data by hand-held scanners. I've been looking around to see if anybody has ha... | TITLE:
Getting "Syntax error in INSERT INTO" for Append Query in VBA (Access 2002)
QUESTION:
I am getting a "Syntax error in INSERT INTO" when I try to run an append query. I'm making a database to make it easier on production operators; capturing some of the data by hand-held scanners. I've been looking around to see... | [
"ms-access"
] | 0 | 2 | 6,543 | 3 | 0 | 2011-05-31T18:05:23.327000 | 2011-05-31T18:45:15.087000 |
6,191,617 | 6,191,674 | Validation throwing an error on ImageField | I have a form where a user uploads an avatar, and it resizes the photo and reloads the page with the new avatar. The form is working perfectly without any validation. When I add a validation to raise an error if the image is below a certain size, the forms.ValidationError works fine. However, when the data does pass va... | Might it be this: form = ProfilePictureForm(request.POST, request.FILES) if form.is_valid(): form = ProfilePictureForm(request.POST, request.FILES, instance = profile)... Once your form validates, you overwrite the form with a new ModelForm that is created from the instance already in the database. This will get rid of... | Validation throwing an error on ImageField I have a form where a user uploads an avatar, and it resizes the photo and reloads the page with the new avatar. The form is working perfectly without any validation. When I add a validation to raise an error if the image is below a certain size, the forms.ValidationError work... | TITLE:
Validation throwing an error on ImageField
QUESTION:
I have a form where a user uploads an avatar, and it resizes the photo and reloads the page with the new avatar. The form is working perfectly without any validation. When I add a validation to raise an error if the image is below a certain size, the forms.Va... | [
"django",
"image-processing",
"django-models",
"django-forms"
] | 1 | 4 | 1,792 | 1 | 0 | 2011-05-31T18:05:34.803000 | 2011-05-31T18:11:16.607000 |
6,191,621 | 6,191,732 | jQuery check/uncheck radio button onclick | I have this code to check/uncheck a radio button onclick. I know it is not good for the UI, but I need this. $('#radioinstant').click(function() { var checked = $(this).attr('checked', true); if(checked){ $(this).attr('checked', false); } else{ $(this).attr('checked', true); } }); The above function is not working. If ... | If all you want to do is have a checkbox that checks, don't worry about doing it with JQuery. That is default functionality of a checkbox on click. However, if you want to do additional things, you can add them with JQuery. Prior to jQuery 1.9, you can use use $(this).attr('checked'); to get the value instead of $(this... | jQuery check/uncheck radio button onclick I have this code to check/uncheck a radio button onclick. I know it is not good for the UI, but I need this. $('#radioinstant').click(function() { var checked = $(this).attr('checked', true); if(checked){ $(this).attr('checked', false); } else{ $(this).attr('checked', true); } ... | TITLE:
jQuery check/uncheck radio button onclick
QUESTION:
I have this code to check/uncheck a radio button onclick. I know it is not good for the UI, but I need this. $('#radioinstant').click(function() { var checked = $(this).attr('checked', true); if(checked){ $(this).attr('checked', false); } else{ $(this).attr('c... | [
"javascript",
"jquery",
"radio-button"
] | 48 | 28 | 256,573 | 26 | 0 | 2011-05-31T18:05:55.567000 | 2011-05-31T18:16:35.673000 |
6,191,627 | 6,191,881 | Line smoothing with Numpy/SciPy | I have a line which should be smoothened by scipy.interpolate.splrep and scipy.interpolate.splev. line = ((x1, y1), (x2, y2),... (xn, yn)) tck = interpolate.splrep(x, y) I need to find more values for my x-coordinate which should be arranged evenly. newx = numpy.XXX(x) newy = interpolate.splev(newx, tck) e.g. (1, 2, 4,... | You could do something like this: import scipy.interpolate as interp z = arange(0,4) x = np.array([1,2,4,3]) f = interp.interp1d(z, x) newx = f(np.linspace(z[0],z[-1],7)) which should give you In [40]: print z [0 1 2 3]
In [41]: print x [1 2 4 3]
In [42]: print newx [ 1. 1.5 2. 3. 4. 3.5 3. ] which will just linearly... | Line smoothing with Numpy/SciPy I have a line which should be smoothened by scipy.interpolate.splrep and scipy.interpolate.splev. line = ((x1, y1), (x2, y2),... (xn, yn)) tck = interpolate.splrep(x, y) I need to find more values for my x-coordinate which should be arranged evenly. newx = numpy.XXX(x) newy = interpolate... | TITLE:
Line smoothing with Numpy/SciPy
QUESTION:
I have a line which should be smoothened by scipy.interpolate.splrep and scipy.interpolate.splev. line = ((x1, y1), (x2, y2),... (xn, yn)) tck = interpolate.splrep(x, y) I need to find more values for my x-coordinate which should be arranged evenly. newx = numpy.XXX(x) ... | [
"python",
"numpy",
"scipy"
] | 2 | 3 | 2,145 | 1 | 0 | 2011-05-31T18:06:38.887000 | 2011-05-31T18:29:32.270000 |
6,191,646 | 6,191,705 | looping over a json object array with jquery | Im trying to loop through a json files' object array to access its variables' keys and values and append them to list items using jquery's getjson and each. I think the solution should be similar to the solution in this article... but I cant seem to make it work and display the results at all... Any help would be very ... | var data = []; You are replacing data with a blank array, thus destroying your data when this is ran. Remove this line, and it should work. EDIT: There are also some syntax errors in your code. You need to close the parenthesis after each of the each statements. It should look like this: $.getJSON('data/file.json', fun... | looping over a json object array with jquery Im trying to loop through a json files' object array to access its variables' keys and values and append them to list items using jquery's getjson and each. I think the solution should be similar to the solution in this article... but I cant seem to make it work and display ... | TITLE:
looping over a json object array with jquery
QUESTION:
Im trying to loop through a json files' object array to access its variables' keys and values and append them to list items using jquery's getjson and each. I think the solution should be similar to the solution in this article... but I cant seem to make it... | [
"jquery",
"json"
] | 3 | 12 | 23,439 | 2 | 0 | 2011-05-31T18:08:33.067000 | 2011-05-31T18:14:33.053000 |
6,191,650 | 6,191,709 | json data repeat itself 2 times | $(document).ready(function() { $("button").click(getir); });
function getir() { $.ajax({ dataType: "json", url:"get.php", success: function(datacall) { $.each(datacall,function(index,vals) { $("span").append(index + ": " + vals + " "); }); } }); } the json data is {"sez":"soze","koz":"koze"} but i get a result like: s... | do you by chance have 2 spans on top of each other? your function works fine: see this fiddle: http://jsfiddle.net/G2ntr/ so, either your data doesn't look like what you say it looks like, or you've got more then one span in your html. | json data repeat itself 2 times $(document).ready(function() { $("button").click(getir); });
function getir() { $.ajax({ dataType: "json", url:"get.php", success: function(datacall) { $.each(datacall,function(index,vals) { $("span").append(index + ": " + vals + " "); }); } }); } the json data is {"sez":"soze","koz":"k... | TITLE:
json data repeat itself 2 times
QUESTION:
$(document).ready(function() { $("button").click(getir); });
function getir() { $.ajax({ dataType: "json", url:"get.php", success: function(datacall) { $.each(datacall,function(index,vals) { $("span").append(index + ": " + vals + " "); }); } }); } the json data is {"se... | [
"jquery"
] | 0 | 1 | 249 | 2 | 0 | 2011-05-31T18:09:02.913000 | 2011-05-31T18:15:00.303000 |
6,191,651 | 6,191,693 | Python: Is passing a function more information a bad thing? | I have two or more threads(created by subclassing threading.Thread) running in parallel and they often communicate with each other. They communicate by calling each others methods. As I have been doing it, I have each thread pass itself as an argument, so that all of that classes attributes are available right away. Th... | It's not less efficient, but it can increase coupling -- that is, it might lead you to make your function more dependent on the details of the overall structure. This makes code more brittle -- you might have to make more changes throughout the code to account for a change in the structure. | Python: Is passing a function more information a bad thing? I have two or more threads(created by subclassing threading.Thread) running in parallel and they often communicate with each other. They communicate by calling each others methods. As I have been doing it, I have each thread pass itself as an argument, so that... | TITLE:
Python: Is passing a function more information a bad thing?
QUESTION:
I have two or more threads(created by subclassing threading.Thread) running in parallel and they often communicate with each other. They communicate by calling each others methods. As I have been doing it, I have each thread pass itself as an... | [
"python",
"multithreading"
] | 3 | 6 | 112 | 2 | 0 | 2011-05-31T18:09:09.450000 | 2011-05-31T18:13:04.330000 |
6,191,662 | 6,191,827 | Django admin login form - overriding max_length failing | I'm trying to make my admin login field greater than 30 characters because I'm using a custom Email Authentication backend that doesn't really care how long the username field is. I wanted to set up a monkey_patch app that would apply the change to all admin sites. from django.contrib.auth.forms import AuthenticationFo... | It looks like I need to modify the widget attrs directly. I forgot that fields are instantiated once! CharField(max_length=30) is already setting the widget attributes for the HTML. No matter how I change max_length on a field instance, the widget has already been generated. Here's my solution in my monkey_patch app. f... | Django admin login form - overriding max_length failing I'm trying to make my admin login field greater than 30 characters because I'm using a custom Email Authentication backend that doesn't really care how long the username field is. I wanted to set up a monkey_patch app that would apply the change to all admin sites... | TITLE:
Django admin login form - overriding max_length failing
QUESTION:
I'm trying to make my admin login field greater than 30 characters because I'm using a custom Email Authentication backend that doesn't really care how long the username field is. I wanted to set up a monkey_patch app that would apply the change ... | [
"django",
"django-admin"
] | 3 | 8 | 2,334 | 3 | 0 | 2011-05-31T18:10:06.250000 | 2011-05-31T18:25:19.913000 |
6,191,663 | 6,191,762 | Enumerate all outgoing Queues in MSMQ, C# | Using C# and.NET 3.5, how can I get a listing of all outgoing queues in MSMQ? I found this article about it but as you can see below I do not have the COM entry for Microsoft Message Queue 3.0 Object Library... So how can I get the current outgoing queue listing? I figured there must be a way since I can see them in Co... | Two good places to start I think would be these: http://msdn.microsoft.com/en-us/library/ms703173%28v=vs.85%29.aspx http://msdn.microsoft.com/en-us/library/ms711378%28v=vs.85%29.aspx I'll see if I can work up some code. Perhaps not, those look old, still looking. Heres some WScript that will show them to you, still loo... | Enumerate all outgoing Queues in MSMQ, C# Using C# and.NET 3.5, how can I get a listing of all outgoing queues in MSMQ? I found this article about it but as you can see below I do not have the COM entry for Microsoft Message Queue 3.0 Object Library... So how can I get the current outgoing queue listing? I figured ther... | TITLE:
Enumerate all outgoing Queues in MSMQ, C#
QUESTION:
Using C# and.NET 3.5, how can I get a listing of all outgoing queues in MSMQ? I found this article about it but as you can see below I do not have the COM entry for Microsoft Message Queue 3.0 Object Library... So how can I get the current outgoing queue listi... | [
"c#",
"msmq"
] | 10 | 3 | 3,491 | 1 | 0 | 2011-05-31T18:10:10.230000 | 2011-05-31T18:18:56.683000 |
6,191,665 | 6,191,943 | Avoiding IntegrityError in custon Django field | Assume a django model with two fields: - created - modified Each field are integers, unique and ever-increasing in value. An object should have the same value for created and modified when saved the first time, and the modified field should be increated to the next free value larger than itself on each save. I've creat... | The only way to do thread-safe database access is to lock the tables before access. A cursory search online turned up this snippet: http://djangosnippets.org/snippets/2039/. Maybe you can do something with that. The Django documentation's section on transactions will be useful to you as well: https://docs.djangoproject... | Avoiding IntegrityError in custon Django field Assume a django model with two fields: - created - modified Each field are integers, unique and ever-increasing in value. An object should have the same value for created and modified when saved the first time, and the modified field should be increated to the next free va... | TITLE:
Avoiding IntegrityError in custon Django field
QUESTION:
Assume a django model with two fields: - created - modified Each field are integers, unique and ever-increasing in value. An object should have the same value for created and modified when saved the first time, and the modified field should be increated t... | [
"django",
"django-models"
] | 0 | 0 | 189 | 1 | 0 | 2011-05-31T18:10:24.880000 | 2011-05-31T18:35:28.057000 |
6,191,666 | 6,192,567 | WCF: Minimum client configuration required | What is the absolute minimum configuration required for a client to consume a WCF service? Maybe I'm wrong, but it doesn't seem logical to restate a bunch of settings values on the client that should really be defined and controlled by the service on the server. A good example is MaxBytesPerRead. But what about securit... | Take a look at this link, but keep in mind that zero config has limitations. For example, as Terry said, if it sees "http", it's going to use the basicHttpBinding, so if you're using REST it will likely break. If you are using basicHttp (or another zero-config capable binding) then I'd say this is the minimum configura... | WCF: Minimum client configuration required What is the absolute minimum configuration required for a client to consume a WCF service? Maybe I'm wrong, but it doesn't seem logical to restate a bunch of settings values on the client that should really be defined and controlled by the service on the server. A good example... | TITLE:
WCF: Minimum client configuration required
QUESTION:
What is the absolute minimum configuration required for a client to consume a WCF service? Maybe I'm wrong, but it doesn't seem logical to restate a bunch of settings values on the client that should really be defined and controlled by the service on the serv... | [
"wcf",
"wcf-client"
] | 0 | 1 | 569 | 1 | 0 | 2011-05-31T18:10:34.707000 | 2011-05-31T19:30:05.447000 |
6,191,670 | 6,191,867 | Can someone help me identify why C# tooltips show when they shouldn't? | I have tool tips running on a C# form and i have a checkbox to disable them showing up. private void checkBox1_CheckedChanged(object sender, EventArgs e) { if (checkBox1.Checked) { Tool_Tips = false; } else Tool_Tips = true; } where Tool_Tips is a Global public bool. each time I hover over a button I use the code: priv... | first of all, make sure there aren't any other event handlers attached to those 4 buttons' Click. after that try changing your method as: private void checkBox1_CheckedChanged(object sender, EventArgs e) { Application.DoEvents(); Tool_Tips =!checkBox1.Checked; } the events might had gotten fired before the checkbox hav... | Can someone help me identify why C# tooltips show when they shouldn't? I have tool tips running on a C# form and i have a checkbox to disable them showing up. private void checkBox1_CheckedChanged(object sender, EventArgs e) { if (checkBox1.Checked) { Tool_Tips = false; } else Tool_Tips = true; } where Tool_Tips is a G... | TITLE:
Can someone help me identify why C# tooltips show when they shouldn't?
QUESTION:
I have tool tips running on a C# form and i have a checkbox to disable them showing up. private void checkBox1_CheckedChanged(object sender, EventArgs e) { if (checkBox1.Checked) { Tool_Tips = false; } else Tool_Tips = true; } wher... | [
"c#",
"winforms",
"tooltip"
] | 0 | 1 | 564 | 1 | 0 | 2011-05-31T18:10:51.133000 | 2011-05-31T18:28:13.003000 |
6,191,671 | 6,191,691 | Android Sqlite watch table for data updates | Say my application has a ListView that displays information from a Sqlite database, using a SimpleCursorAdapter. Other threads will be updating the relevant tables in the database, and the ListView should update automatically. The SimpleCursorAdapter I create doesn't seem to be watching the database for updates. I call... | Using just a SimpleCursorAdapter you will need to call notifyDataSetChanged on the ListView to force it to refresh. | Android Sqlite watch table for data updates Say my application has a ListView that displays information from a Sqlite database, using a SimpleCursorAdapter. Other threads will be updating the relevant tables in the database, and the ListView should update automatically. The SimpleCursorAdapter I create doesn't seem to ... | TITLE:
Android Sqlite watch table for data updates
QUESTION:
Say my application has a ListView that displays information from a Sqlite database, using a SimpleCursorAdapter. Other threads will be updating the relevant tables in the database, and the ListView should update automatically. The SimpleCursorAdapter I creat... | [
"android",
"database",
"sqlite"
] | 0 | 1 | 390 | 1 | 0 | 2011-05-31T18:10:54.253000 | 2011-05-31T18:12:53.533000 |
6,191,672 | 6,191,780 | Python dictionary creation syntax | I'm wondering if there's any way to populate a dictionary such that you have multiple keys mapping to the same value that's less verbose than say: d = {1:'yes', 2:'yes', 3:'yes', 4:'no'} I'm thinking something along the lines of: d = {*(1,2,3):'yes', 4:'no'} which is obviously a syntax error. Is there a reasonably simp... | You could turn it around: >>> d1 = {"yes": [1,2,3], "no": [4]} and then "invert" that dictionary: >>> d2 = {value:key for key in d1 for value in d1[key]} >>> d2 {1: 'yes', 2: 'yes', 3: 'yes', 4: 'no'} | Python dictionary creation syntax I'm wondering if there's any way to populate a dictionary such that you have multiple keys mapping to the same value that's less verbose than say: d = {1:'yes', 2:'yes', 3:'yes', 4:'no'} I'm thinking something along the lines of: d = {*(1,2,3):'yes', 4:'no'} which is obviously a syntax... | TITLE:
Python dictionary creation syntax
QUESTION:
I'm wondering if there's any way to populate a dictionary such that you have multiple keys mapping to the same value that's less verbose than say: d = {1:'yes', 2:'yes', 3:'yes', 4:'no'} I'm thinking something along the lines of: d = {*(1,2,3):'yes', 4:'no'} which is ... | [
"python",
"syntax",
"dictionary"
] | 56 | 87 | 109,513 | 8 | 0 | 2011-05-31T18:11:01.057000 | 2011-05-31T18:21:09.337000 |
6,191,678 | 6,191,800 | Print C++ vtables using GDB | I'm trying to print an object's vtable using gdb; I found the show print vt bl on setting, but I still don't actually know how to print the vtable - p *object still doesn't print it out. How do I print the vtable? | (gdb) set $i = 0 (gdb) while $i < 10 >print $i >p /a (*(void ***)obj)[$i] >set $i = $i + 1 >end Where "obj" is the object whose vtable you'd like to print, and 10 is the number of methods. | Print C++ vtables using GDB I'm trying to print an object's vtable using gdb; I found the show print vt bl on setting, but I still don't actually know how to print the vtable - p *object still doesn't print it out. How do I print the vtable? | TITLE:
Print C++ vtables using GDB
QUESTION:
I'm trying to print an object's vtable using gdb; I found the show print vt bl on setting, but I still don't actually know how to print the vtable - p *object still doesn't print it out. How do I print the vtable?
ANSWER:
(gdb) set $i = 0 (gdb) while $i < 10 >print $i >p /... | [
"c++",
"gdb"
] | 35 | 11 | 32,453 | 5 | 0 | 2011-05-31T18:11:36.640000 | 2011-05-31T18:22:46.527000 |
6,191,679 | 6,191,696 | CSS Expressions | I read somewhere that CSS Expressions were deprecated and shouldn't even be used. I had never heard of them and decided to take a look. I found a code example that kept a floating element in the same spot on the screen, even if you scrolled. Here is some text, which is fixed. [many times: "stuff "] This reminded me of ... | CSS expressions used to work in older IE's, but they have been completely abandoned in IE8: Dynamic properties (also called "CSS expressions") are no longer supported in Internet Explorer 8 and later, in IE8 Standards mode and higher. This decision was made for standards compliance, browser performance, and security re... | CSS Expressions I read somewhere that CSS Expressions were deprecated and shouldn't even be used. I had never heard of them and decided to take a look. I found a code example that kept a floating element in the same spot on the screen, even if you scrolled. Here is some text, which is fixed. [many times: "stuff "] This... | TITLE:
CSS Expressions
QUESTION:
I read somewhere that CSS Expressions were deprecated and shouldn't even be used. I had never heard of them and decided to take a look. I found a code example that kept a floating element in the same spot on the screen, even if you scrolled. Here is some text, which is fixed. [many tim... | [
"html",
"css",
"css-expressions"
] | 55 | 66 | 90,716 | 3 | 0 | 2011-05-31T18:11:45.580000 | 2011-05-31T18:13:22.180000 |
6,191,680 | 6,192,378 | My counter "4-digit BCD Counter" does not work well! | I have designed 4-digit BCD Counter and BCD-to-7segment Converter as a project of one of my courses in the university. Here is the circuit: http://img849.imageshack.us/img849/930/111vr.png and here is the source code: library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity IC_74163 is port(L... | You don't assign anything to the ss signal in the BCD_to_Seven_Segment_Converter_1 architecture, yet that signal is used to determine the output signal. If I had to hazard a guess, you actually want to look at the signals a through g. There is also a far easier way to convert the 4 bits to an integer: --... signal v: s... | My counter "4-digit BCD Counter" does not work well! I have designed 4-digit BCD Counter and BCD-to-7segment Converter as a project of one of my courses in the university. Here is the circuit: http://img849.imageshack.us/img849/930/111vr.png and here is the source code: library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IE... | TITLE:
My counter "4-digit BCD Counter" does not work well!
QUESTION:
I have designed 4-digit BCD Counter and BCD-to-7segment Converter as a project of one of my courses in the university. Here is the circuit: http://img849.imageshack.us/img849/930/111vr.png and here is the source code: library IEEE; use IEEE.STD_LOGI... | [
"counter",
"vhdl"
] | 1 | 3 | 7,048 | 3 | 0 | 2011-05-31T18:11:57.513000 | 2011-05-31T19:13:37.843000 |
6,191,681 | 6,191,790 | Get markers outside geocode function | I want to be able to catch the marker object outside the geocode function and cant figure out how to. Please help me. The code: geocoder.geocode({ address: address }, function(results, status) { if (status == google.maps.GeocoderStatus.OK && results.length) { if (status!= google.maps.GeocoderStatus.ZERO_RESULTS) { map.... | Just declare your marker variable outside the callback and assign it a value inside the callback: var marker = null; geocoder.geocode({ address: address }, function(results, status) { if (status == google.maps.GeocoderStatus.OK && results.length) { if (status!= google.maps.GeocoderStatus.ZERO_RESULTS) { map.setCenter(r... | Get markers outside geocode function I want to be able to catch the marker object outside the geocode function and cant figure out how to. Please help me. The code: geocoder.geocode({ address: address }, function(results, status) { if (status == google.maps.GeocoderStatus.OK && results.length) { if (status!= google.map... | TITLE:
Get markers outside geocode function
QUESTION:
I want to be able to catch the marker object outside the geocode function and cant figure out how to. Please help me. The code: geocoder.geocode({ address: address }, function(results, status) { if (status == google.maps.GeocoderStatus.OK && results.length) { if (s... | [
"javascript",
"google-maps",
"geocode"
] | 0 | 1 | 462 | 1 | 0 | 2011-05-31T18:11:58.137000 | 2011-05-31T18:22:00.523000 |
6,191,685 | 6,191,768 | long integer in C | How can I read a long integer with 12 or 13 digits (like a ISBN number of a book) in C? I want to read the number from a text file with information of books(ISBN/name/writer). The content of the text file is like this: 0393312836 A Clockwork Orange Anthony Burgess 0199536759 Middlemarch Bret Easton Ellis......... and I... | I think for an ISBN you would be much better using a string. You won't need to perform arithmetic on the value, you can store leading zeroes and you'll want a string to store the X that you can get in an ISBN 10 checksum. | long integer in C How can I read a long integer with 12 or 13 digits (like a ISBN number of a book) in C? I want to read the number from a text file with information of books(ISBN/name/writer). The content of the text file is like this: 0393312836 A Clockwork Orange Anthony Burgess 0199536759 Middlemarch Bret Easton El... | TITLE:
long integer in C
QUESTION:
How can I read a long integer with 12 or 13 digits (like a ISBN number of a book) in C? I want to read the number from a text file with information of books(ISBN/name/writer). The content of the text file is like this: 0393312836 A Clockwork Orange Anthony Burgess 0199536759 Middlema... | [
"c",
"file",
"integer",
"long-integer"
] | 2 | 8 | 8,981 | 4 | 0 | 2011-05-31T18:12:32.700000 | 2011-05-31T18:19:17.200000 |
6,191,690 | 6,191,722 | Unable to load xml with simplexml and PHP | For some reason I can't seem to get the basic example to work, provided by PHP.net. Here's my code: $string = " PHP: Behind the Parser Ms. Coder Onlivia Actora Mr. Coder El ActÓr So, this language. It's like, a programming language. Or is it a scripting language? All is revealed in this thrilling horror spoof of a docu... | Remove the line ending after $string = " so it looks like $string = " | Unable to load xml with simplexml and PHP For some reason I can't seem to get the basic example to work, provided by PHP.net. Here's my code: $string = " PHP: Behind the Parser Ms. Coder Onlivia Actora Mr. Coder El ActÓr So, this language. It's like, a programming language. Or is it a scripting language? All is reveale... | TITLE:
Unable to load xml with simplexml and PHP
QUESTION:
For some reason I can't seem to get the basic example to work, provided by PHP.net. Here's my code: $string = " PHP: Behind the Parser Ms. Coder Onlivia Actora Mr. Coder El ActÓr So, this language. It's like, a programming language. Or is it a scripting langua... | [
"php",
"simplexml"
] | 1 | 4 | 1,606 | 4 | 0 | 2011-05-31T18:12:46.827000 | 2011-05-31T18:15:55.033000 |
6,191,700 | 6,192,346 | Recording all paths with data in a binary tree | I am trying to write a function in which records all paths that lead to data N. can anyone give me some pointers as im getting confused, when do i record the path? as if i start at the beginning i may end up with paths that lead to know where. (Recording paths as L | R) Can anyone give me some logic on this! Thanks I h... | main = print. findAllLeaves $ F N (F (F N N) (F N (F N N)))
data Tree = N | F Tree Tree deriving Show data Dir = L | R deriving Show type Path = [Dir]
descend:: Tree -> Dir -> Tree descend (F l _) L = l descend (F _ r) R = r descend _ _ = undefined
findAllLeaves:: Tree -> [Path] findAllLeaves N = [[]] findAllLeaves ... | Recording all paths with data in a binary tree I am trying to write a function in which records all paths that lead to data N. can anyone give me some pointers as im getting confused, when do i record the path? as if i start at the beginning i may end up with paths that lead to know where. (Recording paths as L | R) Ca... | TITLE:
Recording all paths with data in a binary tree
QUESTION:
I am trying to write a function in which records all paths that lead to data N. can anyone give me some pointers as im getting confused, when do i record the path? as if i start at the beginning i may end up with paths that lead to know where. (Recording ... | [
"haskell"
] | 5 | 7 | 1,146 | 2 | 0 | 2011-05-31T18:13:34.330000 | 2011-05-31T19:11:27.507000 |
6,191,704 | 6,191,861 | how to pass the value for datetime field in where clause in sql server | hey guys, i have created a stored procedure, wherein i have datetime field in the select query. here is what my query is select * from tablename where publishdate like '%03/10/2011%' is this possible, or how should i form a query my objective is query should return the records for 10-March-2011 | Using CONVERT select * from tablename where convert(varchar(10), publishdate, 103) = '03/10/2011' | how to pass the value for datetime field in where clause in sql server hey guys, i have created a stored procedure, wherein i have datetime field in the select query. here is what my query is select * from tablename where publishdate like '%03/10/2011%' is this possible, or how should i form a query my objective is que... | TITLE:
how to pass the value for datetime field in where clause in sql server
QUESTION:
hey guys, i have created a stored procedure, wherein i have datetime field in the select query. here is what my query is select * from tablename where publishdate like '%03/10/2011%' is this possible, or how should i form a query m... | [
"sql-server-2008",
"datetime",
"where-clause"
] | 0 | 1 | 4,450 | 3 | 0 | 2011-05-31T18:14:09.823000 | 2011-05-31T18:27:46.233000 |
6,191,707 | 6,191,749 | How to get name of current JSON property while iterating through them in JavaScript? | I have JSON object inside variable like this: var chessPieces = { "p-w-1": { "role":"pawn", "position":{"x":1, "y":2}, "state":"free", "virgin":"yes" }, "p-w-2": { "role":"pawn", "position":{"x":2, "y":2}, "state":"free", "virgin":"yes" },... }; And I'm iterating trough them with for each loop: for (var piece in chessP... | Erm. Isn't piece already the name of the object? The for... in in JavaScript gives you the key name. So when you do for (var piece in chessPieces) console.log(piece);, it will print out p-w-1, p-w-2 etc | How to get name of current JSON property while iterating through them in JavaScript? I have JSON object inside variable like this: var chessPieces = { "p-w-1": { "role":"pawn", "position":{"x":1, "y":2}, "state":"free", "virgin":"yes" }, "p-w-2": { "role":"pawn", "position":{"x":2, "y":2}, "state":"free", "virgin":"yes... | TITLE:
How to get name of current JSON property while iterating through them in JavaScript?
QUESTION:
I have JSON object inside variable like this: var chessPieces = { "p-w-1": { "role":"pawn", "position":{"x":1, "y":2}, "state":"free", "virgin":"yes" }, "p-w-2": { "role":"pawn", "position":{"x":2, "y":2}, "state":"fr... | [
"javascript",
"jquery",
"json",
"for-loop",
"each"
] | 5 | 2 | 8,168 | 3 | 0 | 2011-05-31T18:14:39.713000 | 2011-05-31T18:18:17.763000 |
6,191,708 | 6,192,244 | Excel comparing two csv files and showing the difference | I'm looking to compare two big sets of csv files and/or a csv file and a.txt file. I "think" the.txt file may need to be converted to a csv file just for simplicity sake but that may or may not be needed. I either want to use excel, c++, or python. I need to compare one "accepted" value list to a list that is measured ... | You can use ADO (ODBC/JET/OLEDB Text Driver) to treat 'decent'.txt/.csv/.tab/.flr files as tables in a SQL Database from every COM-enabled language. Then the comparisons could be done using the power of SQL (DISTINCT, GROUP, (LEFT) JOINS,...). Added with regard to your comment: It's your problem and I don't want to pus... | Excel comparing two csv files and showing the difference I'm looking to compare two big sets of csv files and/or a csv file and a.txt file. I "think" the.txt file may need to be converted to a csv file just for simplicity sake but that may or may not be needed. I either want to use excel, c++, or python. I need to comp... | TITLE:
Excel comparing two csv files and showing the difference
QUESTION:
I'm looking to compare two big sets of csv files and/or a csv file and a.txt file. I "think" the.txt file may need to be converted to a csv file just for simplicity sake but that may or may not be needed. I either want to use excel, c++, or pyth... | [
"c++",
"python",
"excel",
"compare"
] | 0 | 2 | 5,377 | 2 | 0 | 2011-05-31T18:14:55.300000 | 2011-05-31T19:03:34.123000 |
6,191,710 | 6,191,831 | Am I implementing a generics-based Java factory correctly? | I don't believe I am implementing the factory pattern correctly because the Application class' createDocument method accepts any class type, not just subclasses of Document. In other words, is there a way I can restrict the createDocument method to only accept subclasses of Document? Document.java package com.example.f... | You should bound your generic so that it is only using T's that inherit Document. example: public class Application { //Add extends Document after T public static T createDocument(Class documentClass) throws InstantiationException, IllegalAccessException { return documentClass.newInstance(); }; } | Am I implementing a generics-based Java factory correctly? I don't believe I am implementing the factory pattern correctly because the Application class' createDocument method accepts any class type, not just subclasses of Document. In other words, is there a way I can restrict the createDocument method to only accept ... | TITLE:
Am I implementing a generics-based Java factory correctly?
QUESTION:
I don't believe I am implementing the factory pattern correctly because the Application class' createDocument method accepts any class type, not just subclasses of Document. In other words, is there a way I can restrict the createDocument meth... | [
"java",
"generics",
"factory-pattern"
] | 14 | 17 | 10,890 | 3 | 0 | 2011-05-31T18:15:01.023000 | 2011-05-31T18:25:27.013000 |
6,191,714 | 6,191,849 | Google Maps PanTo OnClick | I am trying to panTo an area on a map on click. The script is not working and page reloading. Perhaps someone can see the problem. My function function clickroute(lati,long) {
map = google.maps.Map(document.getElementById("map_canvas")); map.panTo(lati,long) } And the rest var directionDisplay; var directionsService =... | The issue is that your using map.panTo(latitude,longitude) but the google maps API uses this: panTo(latLng myLatLng) where latLng is a google map class. try something like this (untested) function clickroute(lati,long) { var latLng = new google.maps.LatLng(lati, long); //Makes a latlng map.panTo(latLng); //Make map glo... | Google Maps PanTo OnClick I am trying to panTo an area on a map on click. The script is not working and page reloading. Perhaps someone can see the problem. My function function clickroute(lati,long) {
map = google.maps.Map(document.getElementById("map_canvas")); map.panTo(lati,long) } And the rest var directionDispla... | TITLE:
Google Maps PanTo OnClick
QUESTION:
I am trying to panTo an area on a map on click. The script is not working and page reloading. Perhaps someone can see the problem. My function function clickroute(lati,long) {
map = google.maps.Map(document.getElementById("map_canvas")); map.panTo(lati,long) } And the rest v... | [
"javascript",
"function",
"google-maps-api-3"
] | 13 | 34 | 63,519 | 5 | 0 | 2011-05-31T18:15:11.683000 | 2011-05-31T18:26:50.460000 |
6,191,717 | 6,192,896 | Nesting IF statements in Excel 2010 | How do I nest IF statements in Excel 2010? I found my inspiration trying to organize data from Evolus Pencil Support Tickets. Here is my desired result: I want to nest IF statments to choose between different status levels, such as Fixed, New, Invalid, Done, Duplicate, etc. However, I had to make several tables to achi... | the formula posted is missing closing brackets. On the assumption it should be =IF(U2="1",CONCATENATE(VALUE(U2),$V$2), IF(U2="2",CONCATENATE(VALUE(U2),$W$2), IF(U2="3",CONCATENATE(VALUE(U2),$X$2), IF(U2="4",CONCATENATE(VALUE(U2),$Y$2), IF(U2="5",CONCATENATE(VALUE(U2),$Z$2), IF(U2="6",CONCATENATE(VALUE(U2),$AA$2),"NO"))... | Nesting IF statements in Excel 2010 How do I nest IF statements in Excel 2010? I found my inspiration trying to organize data from Evolus Pencil Support Tickets. Here is my desired result: I want to nest IF statments to choose between different status levels, such as Fixed, New, Invalid, Done, Duplicate, etc. However, ... | TITLE:
Nesting IF statements in Excel 2010
QUESTION:
How do I nest IF statements in Excel 2010? I found my inspiration trying to organize data from Evolus Pencil Support Tickets. Here is my desired result: I want to nest IF statments to choose between different status levels, such as Fixed, New, Invalid, Done, Duplica... | [
"excel",
"excel-formula",
"excel-2010"
] | 3 | 6 | 5,219 | 1 | 0 | 2011-05-31T18:15:30.903000 | 2011-05-31T20:03:27.537000 |
6,191,718 | 6,192,020 | PHPExcel generating totally jacked up output | Greetings, I am having trouble figuring out how to properly use PHP in general and PHPExcel in particular. I have read multiple posts on this topic and yet I've been running around in circles. Here is the relevant portion of my jacked up code: $viewinv = mysql_connect($sqlsrv,$username,$password); if (!$viewinv) { die(... | The problem will likely be resolved by matching the correct writer types to the correct content-types and file extension. XLSX (office 2007+): Writer: Excel2007 (PHPExcel_Writer_Excel2007) Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet XLS (before office 2007): Writer: Excel5 (PHPExcel_... | PHPExcel generating totally jacked up output Greetings, I am having trouble figuring out how to properly use PHP in general and PHPExcel in particular. I have read multiple posts on this topic and yet I've been running around in circles. Here is the relevant portion of my jacked up code: $viewinv = mysql_connect($sqlsr... | TITLE:
PHPExcel generating totally jacked up output
QUESTION:
Greetings, I am having trouble figuring out how to properly use PHP in general and PHPExcel in particular. I have read multiple posts on this topic and yet I've been running around in circles. Here is the relevant portion of my jacked up code: $viewinv = my... | [
"php",
"mysql",
"phpexcel"
] | 6 | 6 | 8,400 | 2 | 0 | 2011-05-31T18:15:30.967000 | 2011-05-31T18:41:49.320000 |
6,191,720 | 6,202,972 | Regular expression to match generic URL | I've looked all over and have yet to find a single solution to address my need for a regular expression pattern that will match a generic URL. I need to support multiple protocols (with verification), localhost and/or IP addressing, ports and query strings. Some examples: http://localhost/mysite https://localhost:55000... | Nicholas Carey is correct to steer you towards RFC-3986. The regex he points out will match a generic URI, but it will not validate it (and this regex is not good for picking URLs out of "the wild" - it is too loose and matches just about any string including an empty string). Regarding the validation requirement, you ... | Regular expression to match generic URL I've looked all over and have yet to find a single solution to address my need for a regular expression pattern that will match a generic URL. I need to support multiple protocols (with verification), localhost and/or IP addressing, ports and query strings. Some examples: http://... | TITLE:
Regular expression to match generic URL
QUESTION:
I've looked all over and have yet to find a single solution to address my need for a regular expression pattern that will match a generic URL. I need to support multiple protocols (with verification), localhost and/or IP addressing, ports and query strings. Some... | [
"javascript",
".net",
"regex"
] | 0 | 2 | 3,383 | 3 | 0 | 2011-05-31T18:15:49.543000 | 2011-06-01T14:39:11.070000 |
6,191,730 | 6,191,748 | MySQL to SQL Server select statement | I am converting mysql sprocs to SQL Server. I've come across a select statement in mysql that I don't quite understand what it's doing and my google-fu/so-fu has failed me. Here is the gist of it: SELECT AccountType = dbo.functionToGetAccountType() FROM AccountLookup I don't have the ability to debug the original mysql... | The select statement is executing the function dbo.functionToGetAccountType() and aliasing the column as AccountType. It could be re-written as: SELECT dbo.functionToGetAccountType() as AccountType FROM AccountLookup | MySQL to SQL Server select statement I am converting mysql sprocs to SQL Server. I've come across a select statement in mysql that I don't quite understand what it's doing and my google-fu/so-fu has failed me. Here is the gist of it: SELECT AccountType = dbo.functionToGetAccountType() FROM AccountLookup I don't have th... | TITLE:
MySQL to SQL Server select statement
QUESTION:
I am converting mysql sprocs to SQL Server. I've come across a select statement in mysql that I don't quite understand what it's doing and my google-fu/so-fu has failed me. Here is the gist of it: SELECT AccountType = dbo.functionToGetAccountType() FROM AccountLook... | [
"mysql",
"sql-server",
"t-sql"
] | 3 | 5 | 91 | 1 | 0 | 2011-05-31T18:16:14.987000 | 2011-05-31T18:18:04.890000 |
6,191,734 | 6,191,788 | What blog software & theme is used at | What blog software and theme is used at http://mmcgrana.github.com/? (e.g. Wordpress with Forest theme) I'm confused because it's hosted at github.com but am unaware they provide their users with blog software. | It is built using Github Pages service. Here is the link to this repository. | What blog software & theme is used at What blog software and theme is used at http://mmcgrana.github.com/? (e.g. Wordpress with Forest theme) I'm confused because it's hosted at github.com but am unaware they provide their users with blog software. | TITLE:
What blog software & theme is used at
QUESTION:
What blog software and theme is used at http://mmcgrana.github.com/? (e.g. Wordpress with Forest theme) I'm confused because it's hosted at github.com but am unaware they provide their users with blog software.
ANSWER:
It is built using Github Pages service. Here... | [
"github",
"themes",
"blogs"
] | 0 | 1 | 321 | 1 | 0 | 2011-05-31T18:16:49.293000 | 2011-05-31T18:21:51.507000 |
6,191,742 | 6,192,195 | Git clone on Mac with HTTPS not working | I use Git in Windows and Linux on a daily basis and I was just trying to get it going on my Mac but am having an issue doing a simple git clone. I used the installer from the Git website as well as the bash script which adds the environment variable in ~/.MacOSX I say that because I'm not completely sure everything is ... | This is what worked for me and it may or may not be the best solution but its certainly the easiest. git config --global --add http.sslVerify false | Git clone on Mac with HTTPS not working I use Git in Windows and Linux on a daily basis and I was just trying to get it going on my Mac but am having an issue doing a simple git clone. I used the installer from the Git website as well as the bash script which adds the environment variable in ~/.MacOSX I say that becaus... | TITLE:
Git clone on Mac with HTTPS not working
QUESTION:
I use Git in Windows and Linux on a daily basis and I was just trying to get it going on my Mac but am having an issue doing a simple git clone. I used the installer from the Git website as well as the bash script which adds the environment variable in ~/.MacOSX... | [
"git",
"macos"
] | 6 | 13 | 10,038 | 2 | 0 | 2011-05-31T18:17:39.400000 | 2011-05-31T18:59:19.397000 |
6,191,745 | 6,197,267 | Sound quality issues when using NAudio to play several wav files at once | My objective is this: to allow users of my.NET program to choose their own.wav files for sound effects. These effects may be played simultaneously. NAudio seemed like my best bet. I decided to use WaveMixerStream32. One early challenge was that my users had.wav files of different formats, so to be able to mix them toge... | Some points in response to your question: Yes, you have to have all inputs at the same sample rate before you feed them into a mixer. This is simply how digital audio works. The ACM sample rate conversion provided by WaveFormatConversion stream isn't brilliant (has no aliasing protection). What sample rates are your in... | Sound quality issues when using NAudio to play several wav files at once My objective is this: to allow users of my.NET program to choose their own.wav files for sound effects. These effects may be played simultaneously. NAudio seemed like my best bet. I decided to use WaveMixerStream32. One early challenge was that my... | TITLE:
Sound quality issues when using NAudio to play several wav files at once
QUESTION:
My objective is this: to allow users of my.NET program to choose their own.wav files for sound effects. These effects may be played simultaneously. NAudio seemed like my best bet. I decided to use WaveMixerStream32. One early cha... | [
"c#",
"audio",
"naudio"
] | 2 | 4 | 3,608 | 1 | 0 | 2011-05-31T18:17:49.260000 | 2011-06-01T06:45:05.207000 |
6,191,759 | 6,191,889 | Portably Compile Entire Directory | Is there a clean/portable way to descend recursively from a given directory, compiling all found.cpp files into a single output file? I'm not sure if makefiles are capable of this sort of thing, or if it's a job for some kind of build script, but I'd like to avoid maintaining various IDEs' project files along with my c... | There are different things that you can do here. I would suggest that you use a multiplatform build system, and follow the documentation for it. I have used CMake in the past, but I wouldn't know how to tell it to compile all files in a directory. The advantage is that the user can use CMake to generate project files f... | Portably Compile Entire Directory Is there a clean/portable way to descend recursively from a given directory, compiling all found.cpp files into a single output file? I'm not sure if makefiles are capable of this sort of thing, or if it's a job for some kind of build script, but I'd like to avoid maintaining various I... | TITLE:
Portably Compile Entire Directory
QUESTION:
Is there a clean/portable way to descend recursively from a given directory, compiling all found.cpp files into a single output file? I'm not sure if makefiles are capable of this sort of thing, or if it's a job for some kind of build script, but I'd like to avoid mai... | [
"c++",
"build",
"makefile",
"compilation"
] | 1 | 2 | 182 | 2 | 0 | 2011-05-31T18:18:47.077000 | 2011-05-31T18:30:02.113000 |
6,191,766 | 6,191,817 | Using ActionLInk from inside a helper template cshtml page | Why doesn't Html.ActionLink work in the below code? This is a page in the app_code folder, that I am trying to call from index.cshtml LogOnUserControl.cshtml @helper DisplayUserControl(){ if (Request.IsAuthenticated ) { Welcome @User.Identity.Name! [ {@Html.ActionLink("","","")} ] } else { [{@Html.ActionLink("","","") ... | What's the idea with this action links? Why are you passing empty strings as arguments? I suppose you want to generate SignIn, SignOut links, don't you? Also if you want to use HTML helpers inside shared helpers that you put in the App_Code folder you will need to pass them as arguments because they are not available: ... | Using ActionLInk from inside a helper template cshtml page Why doesn't Html.ActionLink work in the below code? This is a page in the app_code folder, that I am trying to call from index.cshtml LogOnUserControl.cshtml @helper DisplayUserControl(){ if (Request.IsAuthenticated ) { Welcome @User.Identity.Name! [ {@Html.Act... | TITLE:
Using ActionLInk from inside a helper template cshtml page
QUESTION:
Why doesn't Html.ActionLink work in the below code? This is a page in the app_code folder, that I am trying to call from index.cshtml LogOnUserControl.cshtml @helper DisplayUserControl(){ if (Request.IsAuthenticated ) { Welcome @User.Identity.... | [
"asp.net-mvc-3",
"razor"
] | 7 | 8 | 6,025 | 1 | 0 | 2011-05-31T18:19:07.793000 | 2011-05-31T18:24:06.590000 |
6,191,771 | 6,191,805 | Query Topics & Categories from multiple tables | I'm having an issue with MySQL. I have two tables, categories and topics. I want to select all of the categories and join topics where categories.id equals the max topics.id where topics.cat_id equals categories.id. Basically I am trying to show a list of categories and then the most recent topic under that category. H... | You should consider updating your select clause to only pull the columns you need from both tables (there will likely be duplicate columns with *), but give this a shot: select * from categories c left join topics t on c.cat_id = t.topic_cat and t.id = (select MAX(id) from topics where topic_cat = c.cat_id) | Query Topics & Categories from multiple tables I'm having an issue with MySQL. I have two tables, categories and topics. I want to select all of the categories and join topics where categories.id equals the max topics.id where topics.cat_id equals categories.id. Basically I am trying to show a list of categories and th... | TITLE:
Query Topics & Categories from multiple tables
QUESTION:
I'm having an issue with MySQL. I have two tables, categories and topics. I want to select all of the categories and join topics where categories.id equals the max topics.id where topics.cat_id equals categories.id. Basically I am trying to show a list of... | [
"mysql"
] | 0 | 0 | 60 | 1 | 0 | 2011-05-31T18:20:06.063000 | 2011-05-31T18:23:01.393000 |
6,191,772 | 6,194,392 | Calling C/C++ functions in dynamic and static libraries in D | I'm having trouble wrapping my head around how to interface with C/C++ libraries, both static (.lib/.a) and dynamic (.dll/.so), in D. From what I understand, it's possible to tell the DMD compiler to link with.lib files, and that you can convert.dll files to.lib with the implib tool that Digital Mars provides. In addit... | Note you are dealing with three phases for generating an executable. During compilation you are creating object files (.lib/.a are just archives of object files). Once these files are created you use a Linker to put all the pieces together. When dealing with dynamic libraries (.dll,.so) there is the extra step of loadi... | Calling C/C++ functions in dynamic and static libraries in D I'm having trouble wrapping my head around how to interface with C/C++ libraries, both static (.lib/.a) and dynamic (.dll/.so), in D. From what I understand, it's possible to tell the DMD compiler to link with.lib files, and that you can convert.dll files to.... | TITLE:
Calling C/C++ functions in dynamic and static libraries in D
QUESTION:
I'm having trouble wrapping my head around how to interface with C/C++ libraries, both static (.lib/.a) and dynamic (.dll/.so), in D. From what I understand, it's possible to tell the DMD compiler to link with.lib files, and that you can con... | [
"c++",
"c",
"d"
] | 5 | 5 | 2,975 | 2 | 0 | 2011-05-31T18:20:16.980000 | 2011-05-31T22:44:07.317000 |
6,191,775 | 6,224,230 | Share free space in a WrapPanel | I'm using a WrapPanel in WPF to display images. When resizing the form, these images are trying to take the maximum of the free spaces but when the picture can almost fill the space, there is a relatively big gap at the end of the WrapPanel. What I would like to do is to share this space between the images before a new... | Lookout code of BalancedWrapPanel for WPF in this article. Or you may calculate Margin for Images how ((Width of WrapPanel) - (summ Width of Images)) / (Images count) and set this Margin property for Image type in WrapPanel Resources. | Share free space in a WrapPanel I'm using a WrapPanel in WPF to display images. When resizing the form, these images are trying to take the maximum of the free spaces but when the picture can almost fill the space, there is a relatively big gap at the end of the WrapPanel. What I would like to do is to share this space... | TITLE:
Share free space in a WrapPanel
QUESTION:
I'm using a WrapPanel in WPF to display images. When resizing the form, these images are trying to take the maximum of the free spaces but when the picture can almost fill the space, there is a relatively big gap at the end of the WrapPanel. What I would like to do is t... | [
"wpf",
"wrappanel"
] | 6 | 3 | 944 | 1 | 0 | 2011-05-31T18:20:36.813000 | 2011-06-03T07:30:14.807000 |
6,191,777 | 6,191,807 | How to crop a text that it can fit into a block-type tag? | In my form I'm asking users to enter a text and then when they submit the form the text is sent to my database. When I query the entered text and I insert it into my html page it doesn't fit the container instead if a line has to many words it outputs the line in length. I'd like to know how can I do to crop the line i... | If you need to "crop" text you can simply use substr. echo substr($string,0,150); This will cut your string up to 150 chars @OP: after reading your question. Did you mean the css? overflow: hidden; Anyway even if you div is set to display:block; it shouldn't show the horizontal scrollbar Addendum The problem with your ... | How to crop a text that it can fit into a block-type tag? In my form I'm asking users to enter a text and then when they submit the form the text is sent to my database. When I query the entered text and I insert it into my html page it doesn't fit the container instead if a line has to many words it outputs the line i... | TITLE:
How to crop a text that it can fit into a block-type tag?
QUESTION:
In my form I'm asking users to enter a text and then when they submit the form the text is sent to my database. When I query the entered text and I insert it into my html page it doesn't fit the container instead if a line has to many words it ... | [
"php",
"html",
"text",
"tags"
] | 1 | 2 | 1,149 | 5 | 0 | 2011-05-31T18:20:40.590000 | 2011-05-31T18:23:05.653000 |
6,191,781 | 6,191,816 | Is using DateTime.Now really something to worry about? | I just read http://aspalliance.com/2062_The_Darkness_Behind_DateTimeNow and started to wonder if this is really something to worry about.. The graph in the article clearly shows that using DateTime.Now is 'much' slower then using DateTime.UtcNow. Is this graph meaningful for any application you have written? Is this so... | As is the answer to any preconceived performance issue, test it. Does your app call DateTime.Now many many times in some performance critical section of code? If not than I severely doubt it will cause you any appreciable problems, and even if you do you should still test it to see how much slowdown the call causes rel... | Is using DateTime.Now really something to worry about? I just read http://aspalliance.com/2062_The_Darkness_Behind_DateTimeNow and started to wonder if this is really something to worry about.. The graph in the article clearly shows that using DateTime.Now is 'much' slower then using DateTime.UtcNow. Is this graph mean... | TITLE:
Is using DateTime.Now really something to worry about?
QUESTION:
I just read http://aspalliance.com/2062_The_Darkness_Behind_DateTimeNow and started to wonder if this is really something to worry about.. The graph in the article clearly shows that using DateTime.Now is 'much' slower then using DateTime.UtcNow. ... | [
"c#",
"performance",
"datetime"
] | 0 | 2 | 313 | 2 | 0 | 2011-05-31T18:21:13.863000 | 2011-05-31T18:24:00.930000 |
6,191,784 | 6,191,855 | Store datalist eval into a variable | is there a way to store field from a DataList? Such as string year = Eval("date"); I want to do manipulation on the string year, and need to store it in the variable if possible! | If you're using Eval, I'm guessing you're doing work inside a databinding expression? If so, that's generally the wrong place to do any actual post-processing of the data, but if you must do so, you should be able to explicitly cast like so: string year = (string)Eval("date") Or, if the variable isn't a string type nat... | Store datalist eval into a variable is there a way to store field from a DataList? Such as string year = Eval("date"); I want to do manipulation on the string year, and need to store it in the variable if possible! | TITLE:
Store datalist eval into a variable
QUESTION:
is there a way to store field from a DataList? Such as string year = Eval("date"); I want to do manipulation on the string year, and need to store it in the variable if possible!
ANSWER:
If you're using Eval, I'm guessing you're doing work inside a databinding expr... | [
"c#",
".net",
"asp.net"
] | 0 | 2 | 3,169 | 2 | 0 | 2011-05-31T18:21:29.293000 | 2011-05-31T18:27:20.650000 |
6,191,789 | 6,215,742 | HTML how to tell which elements are visible? | I have seen several solutions which determine when an element is visible in the viewport whilst scrolling the page, but I haven't seen any which do this for elements that are contained in a scrolling container div as in the example here. How would I detect the items as they scroll into view via the scrolling div? And b... | include jQuery library on page first. function getObjDims(obj){ if (!obj) return false; var off = $(obj).offset(); var t = { top:off.top, left:off.left, width:$(obj).width(), height:$(obj).height() }; return {x1:t.left, y1:t.top, x2:t.left+t.width,y2:t.top+t.height} }; function testInside(pic,box){ var d=getObjDims(pic... | HTML how to tell which elements are visible? I have seen several solutions which determine when an element is visible in the viewport whilst scrolling the page, but I haven't seen any which do this for elements that are contained in a scrolling container div as in the example here. How would I detect the items as they ... | TITLE:
HTML how to tell which elements are visible?
QUESTION:
I have seen several solutions which determine when an element is visible in the viewport whilst scrolling the page, but I haven't seen any which do this for elements that are contained in a scrolling container div as in the example here. How would I detect ... | [
"javascript",
"html"
] | 7 | 2 | 676 | 2 | 0 | 2011-05-31T18:21:58.247000 | 2011-06-02T14:16:06.233000 |
6,191,801 | 6,191,839 | Using mysql_real_escape_string with PDO (no connection to localhost server) | So I'm fairly paranoid and use mysql_real_escape_string() with PDO. I actually don't use prepared statements in PDO, so I do have to sanitize the inputs. When hosting on my own server, I'd create an unprivileged user on the local machine so mysql_real_escape_string() wouldn't fail and empty my variable (heh, now that's... | Mixing two database libraries like this is a bad idea and potentially unsafe. mysql_real_escape_string() needs an existing, classic mysql_connect() database connection (which it can get character set info from) to be totally safe. The PDO connection will be separate, possibly with different character set settings, ulti... | Using mysql_real_escape_string with PDO (no connection to localhost server) So I'm fairly paranoid and use mysql_real_escape_string() with PDO. I actually don't use prepared statements in PDO, so I do have to sanitize the inputs. When hosting on my own server, I'd create an unprivileged user on the local machine so mys... | TITLE:
Using mysql_real_escape_string with PDO (no connection to localhost server)
QUESTION:
So I'm fairly paranoid and use mysql_real_escape_string() with PDO. I actually don't use prepared statements in PDO, so I do have to sanitize the inputs. When hosting on my own server, I'd create an unprivileged user on the lo... | [
"php",
"mysql",
"security",
"pdo",
"mysql-real-escape-string"
] | 2 | 16 | 11,651 | 2 | 0 | 2011-05-31T18:22:51.537000 | 2011-05-31T18:26:24.753000 |
6,191,803 | 6,196,989 | Tortoise SVN - HD with Repository broken, but the folder was recovered - create new repository? | As described in the header, I lost a hard drive that had a tortoise repository on it, but I managed to recover the files folder from that drive, unfortunately without the repository. In the meantime the recovered folder now has a "!" icon on it, and I can't do anything with it (clean up, relocate, check in) since it sa... | Cleanup doesn't require access to the repository. If even cleanup fails, then your backup wasn't complete or completely successful because the working copy is broken. If you lost the repository, then you have to start from scratch (now you know why backups are important). Since you still have the files from your workin... | Tortoise SVN - HD with Repository broken, but the folder was recovered - create new repository? As described in the header, I lost a hard drive that had a tortoise repository on it, but I managed to recover the files folder from that drive, unfortunately without the repository. In the meantime the recovered folder now ... | TITLE:
Tortoise SVN - HD with Repository broken, but the folder was recovered - create new repository?
QUESTION:
As described in the header, I lost a hard drive that had a tortoise repository on it, but I managed to recover the files folder from that drive, unfortunately without the repository. In the meantime the rec... | [
"tortoisesvn",
"repository",
"recover"
] | 0 | 0 | 212 | 1 | 0 | 2011-05-31T18:22:55.907000 | 2011-06-01T06:12:48.150000 |
6,191,804 | 6,192,017 | Android/Java: Split Data in an Array and display | I am trying to do something extremely basic! And it wont work:(. I feel like I'm going in circles. Here's the rundown: I would like the user to input a series of numbers into an EditText box (separated by comma's). After the add button is selected a split method will separate each number into its own slot in a String[]... | In your for-loop you should iterate from 0 to a.length - 1. This means the loop must look like: for (int i = 0; i < a.length; i++) { /*... */ } But you'd better use something like that: public String calculate(String[] a) {
StringBuilder output = new StringBuilder();
for (String s: a) { output.append(' ').append(s); ... | Android/Java: Split Data in an Array and display I am trying to do something extremely basic! And it wont work:(. I feel like I'm going in circles. Here's the rundown: I would like the user to input a series of numbers into an EditText box (separated by comma's). After the add button is selected a split method will sep... | TITLE:
Android/Java: Split Data in an Array and display
QUESTION:
I am trying to do something extremely basic! And it wont work:(. I feel like I'm going in circles. Here's the rundown: I would like the user to input a series of numbers into an EditText box (separated by comma's). After the add button is selected a spl... | [
"java",
"android"
] | 0 | 2 | 1,903 | 3 | 0 | 2011-05-31T18:22:58.573000 | 2011-05-31T18:41:36.113000 |
6,191,809 | 6,216,317 | Delete the subwidgets/entries from a tk::menu widget | I want to implement a history/recent-files functionality for my Perl/ Tk program. Here is a working code excerpt from my program to demonstrate my problem. #!/usr/bin/perl
use strict; use warnings; use English qw( -no_match_vars );
use Tk;
my @history_entries = qw(Back To The History);
my $mw = MainWindow->new(); m... | I ended up rebuilding the whole menu. That's how my code looks like atm. I am not proud of it but it works... I am open to any form of advice. #!/usr/bin/perl
use strict; use warnings; use English qw( -no_match_vars );
use Tk;
# History entries are stored in array my @history_entries = qw(Back To The History);
my $... | Delete the subwidgets/entries from a tk::menu widget I want to implement a history/recent-files functionality for my Perl/ Tk program. Here is a working code excerpt from my program to demonstrate my problem. #!/usr/bin/perl
use strict; use warnings; use English qw( -no_match_vars );
use Tk;
my @history_entries = qw... | TITLE:
Delete the subwidgets/entries from a tk::menu widget
QUESTION:
I want to implement a history/recent-files functionality for my Perl/ Tk program. Here is a working code excerpt from my program to demonstrate my problem. #!/usr/bin/perl
use strict; use warnings; use English qw( -no_match_vars );
use Tk;
my @hi... | [
"perl",
"tk-toolkit"
] | 1 | 0 | 1,968 | 2 | 0 | 2011-05-31T18:23:09.743000 | 2011-06-02T15:02:07.070000 |
6,191,815 | 6,191,951 | c# abstract inheritance design question | I am somewhat new to C# and am trying to do a good job following OO principles and write good code. After spending a couple of hours searching for my question, I found some vague answers, but nothing solid enough for me feel confident about. There is a good chance I am asking a dumb question and approaching this proble... | Here's an example of an abstract class Deck, with specific implementations of PokerDeck and MagicDeck. As others have said, I'm not sure it's the best example, because there really isn't a lot of commonality between the games. Maybe if you did something like Hand with SpadesHand, HeartsHand, PinochleHand, PresidentsHan... | c# abstract inheritance design question I am somewhat new to C# and am trying to do a good job following OO principles and write good code. After spending a couple of hours searching for my question, I found some vague answers, but nothing solid enough for me feel confident about. There is a good chance I am asking a d... | TITLE:
c# abstract inheritance design question
QUESTION:
I am somewhat new to C# and am trying to do a good job following OO principles and write good code. After spending a couple of hours searching for my question, I found some vague answers, but nothing solid enough for me feel confident about. There is a good chan... | [
"c#",
"inheritance",
"abstract"
] | 3 | 1 | 837 | 6 | 0 | 2011-05-31T18:23:57.090000 | 2011-05-31T18:36:14.140000 |
6,191,832 | 6,194,241 | Get MAC Address of android device without Wifi | How do I get the MAC-Address of the network interface of an android device which doesn't have a Wifi-Interface (e.g. the android emulator)? WifiInfo obtained via the WifiManager returns null. EDIT To be more clear: I have to communicate with an existing network protocol (not designed by me) on the local network where I... | Read /sys/class/net/[something]/address as a text file But it's unlikely to be useful in the way you think. | Get MAC Address of android device without Wifi How do I get the MAC-Address of the network interface of an android device which doesn't have a Wifi-Interface (e.g. the android emulator)? WifiInfo obtained via the WifiManager returns null. EDIT To be more clear: I have to communicate with an existing network protocol (n... | TITLE:
Get MAC Address of android device without Wifi
QUESTION:
How do I get the MAC-Address of the network interface of an android device which doesn't have a Wifi-Interface (e.g. the android emulator)? WifiInfo obtained via the WifiManager returns null. EDIT To be more clear: I have to communicate with an existing n... | [
"android",
"mac-address"
] | 23 | 18 | 56,701 | 5 | 0 | 2011-05-31T18:25:30.617000 | 2011-05-31T22:21:06.747000 |
6,191,850 | 6,193,471 | Required fields not met when closing window | I'm looking for the best way to go about "forcing" the user to fill a textarea. For my work we have a system that keeps track of time spent on a particular "task". Some tasks are required to have a comment while others are optional. At the top of the page there is a timer, a textarea for the comments and a list of diff... | Put that text area in a popup or iframe or modal window where you can control its closing. On these window.close you can call the functions to validate the text area is filled or not. Am not sure you can put that in a popup or not.but thats the only good way i can think of!! | Required fields not met when closing window I'm looking for the best way to go about "forcing" the user to fill a textarea. For my work we have a system that keeps track of time spent on a particular "task". Some tasks are required to have a comment while others are optional. At the top of the page there is a timer, a ... | TITLE:
Required fields not met when closing window
QUESTION:
I'm looking for the best way to go about "forcing" the user to fill a textarea. For my work we have a system that keeps track of time spent on a particular "task". Some tasks are required to have a comment while others are optional. At the top of the page th... | [
"javascript",
"alert",
"required-field"
] | 0 | 0 | 140 | 2 | 0 | 2011-05-31T18:27:09.527000 | 2011-05-31T20:57:31.227000 |
6,191,853 | 6,192,001 | validation of emails using jquery | i have data having emails: data pattern is like: first_name last_name email data = foo bar foo@bar.com, foo baz foo@baz.com,foo foo foo@foo.com,bar@bar.com, bar baz bar@baz.com It may contain spaces. I have to valiadte all the emails by extracting the data. Note: There may be spaces between words so that spliting by sp... | The following function split the main data string into an array; which then can be parsed with RegExp. As far as I can tell you only want to get the email address; so, we use a Regular Expression to match an email address. If it matches, you have a valid email. If there's no match; then basically there's no valid email... | validation of emails using jquery i have data having emails: data pattern is like: first_name last_name email data = foo bar foo@bar.com, foo baz foo@baz.com,foo foo foo@foo.com,bar@bar.com, bar baz bar@baz.com It may contain spaces. I have to valiadte all the emails by extracting the data. Note: There may be spaces be... | TITLE:
validation of emails using jquery
QUESTION:
i have data having emails: data pattern is like: first_name last_name email data = foo bar foo@bar.com, foo baz foo@baz.com,foo foo foo@foo.com,bar@bar.com, bar baz bar@baz.com It may contain spaces. I have to valiadte all the emails by extracting the data. Note: Ther... | [
"javascript",
"jquery",
"validation"
] | 0 | 1 | 167 | 4 | 0 | 2011-05-31T18:27:15.963000 | 2011-05-31T18:40:31.057000 |
6,191,854 | 6,191,906 | what is the easy way of showing xml data in aspx in some sort of data container? | what is the easy way of showing xml data in aspx in some sort of data container? in fx a gridview - note that the xml is in a tree structure...... and i also have a schema that defines the xml | System.Data.DataSet has a method named ReadXml() which will turn that XML (w/ or w/o schema) into a DataSet, which you can bind to your GridView as its data source. | what is the easy way of showing xml data in aspx in some sort of data container? what is the easy way of showing xml data in aspx in some sort of data container? in fx a gridview - note that the xml is in a tree structure...... and i also have a schema that defines the xml | TITLE:
what is the easy way of showing xml data in aspx in some sort of data container?
QUESTION:
what is the easy way of showing xml data in aspx in some sort of data container? in fx a gridview - note that the xml is in a tree structure...... and i also have a schema that defines the xml
ANSWER:
System.Data.DataSet... | [
"asp.net",
"xml",
"c#-4.0"
] | 1 | 2 | 59 | 1 | 0 | 2011-05-31T18:27:16.390000 | 2011-05-31T18:31:50.350000 |
6,191,857 | 6,193,706 | Embed facebook posts? | How can I embed just the posts made on a Facebook page into another website? Ive read a few things about this but all they talk about embedding more than just the posts made. | Facebook has a blog post with a section titled Graph API to pull comments that would allow you to render all the comments on page. They have sample code in PHP, but you would just need to make an http request with whatever language you are using to https://graph.facebook.com/comments/?ids= {YOUR_URL} | Embed facebook posts? How can I embed just the posts made on a Facebook page into another website? Ive read a few things about this but all they talk about embedding more than just the posts made. | TITLE:
Embed facebook posts?
QUESTION:
How can I embed just the posts made on a Facebook page into another website? Ive read a few things about this but all they talk about embedding more than just the posts made.
ANSWER:
Facebook has a blog post with a section titled Graph API to pull comments that would allow you t... | [
"facebook",
"embed"
] | 0 | 0 | 2,729 | 1 | 0 | 2011-05-31T18:27:35.267000 | 2011-05-31T21:20:29.867000 |
6,191,860 | 6,192,395 | Grails redirect to a page in case of error | Here is a simple question. Is there any possibility of, if in any case there's an error in an application and the server show us an error page, instead redirect everything to a default page? Covering all errors.. is that possible? | Grails already does this for you. If an exception bubbles up to the container, it gets handled as an HTTP 500 (Internal Server Error). With conf/URLMappings.groovy you can control what happens what happens when error statuses occur. Here's the default mapping for 500 responses (from conf/URLMappings.groovy ): "500"(vie... | Grails redirect to a page in case of error Here is a simple question. Is there any possibility of, if in any case there's an error in an application and the server show us an error page, instead redirect everything to a default page? Covering all errors.. is that possible? | TITLE:
Grails redirect to a page in case of error
QUESTION:
Here is a simple question. Is there any possibility of, if in any case there's an error in an application and the server show us an error page, instead redirect everything to a default page? Covering all errors.. is that possible?
ANSWER:
Grails already does... | [
"grails",
"redirect"
] | 6 | 7 | 5,824 | 1 | 0 | 2011-05-31T18:27:43.517000 | 2011-05-31T19:14:40.840000 |
6,191,869 | 6,192,048 | XmlDocument.Save() inserts empty square brackets in doctype declaration | Everytime I call the method on XmlDocument.Save(fooFilepath); it inserts two square brackets at the end of the DOCTYPE tag e.g. Does anyone know why this might happen? I obviously don't want this to happen. | That is a normal (and optional) part of a DOCTYPE declaration. Where DTD contains any internal subset declarations to your document. | XmlDocument.Save() inserts empty square brackets in doctype declaration Everytime I call the method on XmlDocument.Save(fooFilepath); it inserts two square brackets at the end of the DOCTYPE tag e.g. Does anyone know why this might happen? I obviously don't want this to happen. | TITLE:
XmlDocument.Save() inserts empty square brackets in doctype declaration
QUESTION:
Everytime I call the method on XmlDocument.Save(fooFilepath); it inserts two square brackets at the end of the DOCTYPE tag e.g. Does anyone know why this might happen? I obviously don't want this to happen.
ANSWER:
That is a norm... | [
"c#",
"xml"
] | 15 | 7 | 2,776 | 3 | 0 | 2011-05-31T18:28:16.227000 | 2011-05-31T18:44:14.937000 |
6,191,873 | 6,191,888 | How to import libraries in PHP | I am normally an ASP.NET developer who wants to migrate to PHP. I am taking quite a time to learn it and I am wondering how to use libraries in PHP? Do I need to use require or include to import a library into my project to use the classes, functions etc. defined in the library? Or something else. I running PHP on the ... | You can use both. Require will throw a fatal error if the file is not found. require('lib.class.php'); You could use include if you need to continue the script even if the file couldn't get loaded. Like: if (!include('lib')) { doWhatever(); } | How to import libraries in PHP I am normally an ASP.NET developer who wants to migrate to PHP. I am taking quite a time to learn it and I am wondering how to use libraries in PHP? Do I need to use require or include to import a library into my project to use the classes, functions etc. defined in the library? Or someth... | TITLE:
How to import libraries in PHP
QUESTION:
I am normally an ASP.NET developer who wants to migrate to PHP. I am taking quite a time to learn it and I am wondering how to use libraries in PHP? Do I need to use require or include to import a library into my project to use the classes, functions etc. defined in the ... | [
"php"
] | 9 | 14 | 37,782 | 1 | 0 | 2011-05-31T18:28:51.237000 | 2011-05-31T18:29:56.930000 |
6,191,874 | 6,194,000 | Unique log file for each instance of class | I am currently running a windows service that creates multiple instances of a class. At the top of the service class and every other class in my solution, I have something like this: private static readonly ILog _log = LogManager.GetLogger(typeof(SomeClassTypeHere)); In my App.config, I have Log4Net configured for a si... | The code below shows how you can programatically configure log4Net without using a configuration file to achieve the effect you're looking for. Basically, it just involves creating a named logger and adding to the hierarchy. I used as a starting point one of the answers from here. using log4net; using log4net.Appender;... | Unique log file for each instance of class I am currently running a windows service that creates multiple instances of a class. At the top of the service class and every other class in my solution, I have something like this: private static readonly ILog _log = LogManager.GetLogger(typeof(SomeClassTypeHere)); In my App... | TITLE:
Unique log file for each instance of class
QUESTION:
I am currently running a windows service that creates multiple instances of a class. At the top of the service class and every other class in my solution, I have something like this: private static readonly ILog _log = LogManager.GetLogger(typeof(SomeClassTyp... | [
"c#",
"logging",
"service",
"log4net"
] | 17 | 16 | 6,894 | 4 | 0 | 2011-05-31T18:28:56.260000 | 2011-05-31T21:52:19.193000 |
6,191,876 | 6,193,175 | Render ASP.NET MVC 3 ViewModels as ListView, Accordian or simple list in a Razor view | I am trying to build a sample for myself using MVC3, Razor view engine and JQuery UI. From the controller I return a ViewModel (which has List) and able to wrap the JQuery Accordion around the html segments. Everything works as expected. Now, I am trying to make it little better. 1) Would like to have a pagination bar,... | Re (2): I think it's a bad idea to generate the HTML inside the controller -- separation of concerns suggests that the View should be solely responsible for the HTML. However, you can have a property in your View Model that tells the view which version to generate: e.g. public class XyzModel { public string displayType... | Render ASP.NET MVC 3 ViewModels as ListView, Accordian or simple list in a Razor view I am trying to build a sample for myself using MVC3, Razor view engine and JQuery UI. From the controller I return a ViewModel (which has List) and able to wrap the JQuery Accordion around the html segments. Everything works as expect... | TITLE:
Render ASP.NET MVC 3 ViewModels as ListView, Accordian or simple list in a Razor view
QUESTION:
I am trying to build a sample for myself using MVC3, Razor view engine and JQuery UI. From the controller I return a ViewModel (which has List) and able to wrap the JQuery Accordion around the html segments. Everythi... | [
"jquery",
"asp.net-mvc-3",
"razor"
] | 2 | 1 | 1,525 | 1 | 0 | 2011-05-31T18:29:16.480000 | 2011-05-31T20:27:44.020000 |
6,191,879 | 6,191,979 | New is taking lots of extra memory | I'm making an application that is going to be using many dynamically created objects (raytracing). Instead of just using [new] over and over again, I thought I'd just make a simple memory system to speed things up. Its very simple at this point, as I don't need much. My question is: when I run this test application, us... | There is a minimum size for a memory allocation, depending on the CRT you are using. Often that's 16 bytes. Your object is 12 bytes wide (assuming x86), so you're probably wasting at least 4 bytes per allocation right there. The memory manager also has it's own structures to keep track of what memory is free and what m... | New is taking lots of extra memory I'm making an application that is going to be using many dynamically created objects (raytracing). Instead of just using [new] over and over again, I thought I'd just make a simple memory system to speed things up. Its very simple at this point, as I don't need much. My question is: w... | TITLE:
New is taking lots of extra memory
QUESTION:
I'm making an application that is going to be using many dynamically created objects (raytracing). Instead of just using [new] over and over again, I thought I'd just make a simple memory system to speed things up. Its very simple at this point, as I don't need much.... | [
"c++",
"memory",
"new-operator"
] | 3 | 4 | 145 | 2 | 0 | 2011-05-31T18:29:21.943000 | 2011-05-31T18:38:37.167000 |
6,191,880 | 6,202,866 | Best way to do a looping move effect in flex? | I want to display an animated arrow that goes back and forth (using flex 4). I'm using the following move effect: When needed, I then play the effect: animateArrow.end(); animateArrow.play(); The animation works as intended but it seems to be a huge resource hog while playing. Any logic that happens while playing the a... | Any effect will take resources. If it's taking more cpu than anticipated, you might want to look at the object you're moving, it's container, and the code it might affect. Personally, I wouldn't use Adobe's animation library as they aren't very optimized. I would look at TweenMax instead. | Best way to do a looping move effect in flex? I want to display an animated arrow that goes back and forth (using flex 4). I'm using the following move effect: When needed, I then play the effect: animateArrow.end(); animateArrow.play(); The animation works as intended but it seems to be a huge resource hog while playi... | TITLE:
Best way to do a looping move effect in flex?
QUESTION:
I want to display an animated arrow that goes back and forth (using flex 4). I'm using the following move effect: When needed, I then play the effect: animateArrow.end(); animateArrow.play(); The animation works as intended but it seems to be a huge resour... | [
"apache-flex",
"flex4",
"effects",
"move"
] | 1 | 3 | 1,050 | 1 | 0 | 2011-05-31T18:29:26.213000 | 2011-06-01T14:32:23.627000 |
6,191,883 | 6,191,974 | jquery hide show | I have a table generated from database ( basically in MVC view). I want to make it editable. I want to use jquery to hide the row when edit button infront of row is clicked and show the row in edit format which is by default hidden. how can I do this using jquery? Please suggest solution Thanks | JQuery Show http://api.jquery.com/show/ JQuery Hide http://api.jquery.com/hide/ You also may want to make use of div tables for this project instead of actual tables. You selectors such as $("#idofcolumn").toggle(); to hide and show the div or in your case you would probably want to show a text field. You could even.ht... | jquery hide show I have a table generated from database ( basically in MVC view). I want to make it editable. I want to use jquery to hide the row when edit button infront of row is clicked and show the row in edit format which is by default hidden. how can I do this using jquery? Please suggest solution Thanks | TITLE:
jquery hide show
QUESTION:
I have a table generated from database ( basically in MVC view). I want to make it editable. I want to use jquery to hide the row when edit button infront of row is clicked and show the row in edit format which is by default hidden. how can I do this using jquery? Please suggest solut... | [
"asp.net-mvc-2"
] | 0 | 0 | 657 | 3 | 0 | 2011-05-31T18:29:37.430000 | 2011-05-31T18:38:03.970000 |
6,191,892 | 6,191,932 | The act of breaking functions apart is called what? | Typically I implement classes (C#, C++) via many private functions that serve no purpose other than to separate concerns & logic for readability, maintainability, and scope. For example, if I see a function that is 100 lines long and has 3 comments in it separating it out into virtual 1/3 section chunks, that to me is ... | Refactoring is changing the code w/o changing its behavior. When you break code into more methods, it's called Refactoring to Method. When you take those methods and put their behaviors into many classes (which can help maintain single responsibilities per object/class), it's called Refactoring to Objects. | The act of breaking functions apart is called what? Typically I implement classes (C#, C++) via many private functions that serve no purpose other than to separate concerns & logic for readability, maintainability, and scope. For example, if I see a function that is 100 lines long and has 3 comments in it separating it... | TITLE:
The act of breaking functions apart is called what?
QUESTION:
Typically I implement classes (C#, C++) via many private functions that serve no purpose other than to separate concerns & logic for readability, maintainability, and scope. For example, if I see a function that is 100 lines long and has 3 comments i... | [
"function",
"paradigms"
] | 3 | 1 | 1,087 | 5 | 0 | 2011-05-31T18:30:13.817000 | 2011-05-31T18:34:18.757000 |
6,191,898 | 6,191,914 | SSH in shell script with password | I want to write one shell script like command1 ssh vivek@remotehost fire command on remote host Now I have password in pass.txt. But when I change stdin with file. It is not reading password from file. script.sh < password.txt It is prompting for the password in place of reading password from the file. What I am doing ... | You can use ssh-agent or expect (the programing language) to do this. | SSH in shell script with password I want to write one shell script like command1 ssh vivek@remotehost fire command on remote host Now I have password in pass.txt. But when I change stdin with file. It is not reading password from file. script.sh < password.txt It is prompting for the password in place of reading passwo... | TITLE:
SSH in shell script with password
QUESTION:
I want to write one shell script like command1 ssh vivek@remotehost fire command on remote host Now I have password in pass.txt. But when I change stdin with file. It is not reading password from file. script.sh < password.txt It is prompting for the password in place... | [
"shell",
"ssh"
] | 0 | 2 | 3,156 | 3 | 0 | 2011-05-31T18:30:47.637000 | 2011-05-31T18:32:33.067000 |
6,191,900 | 6,193,311 | Need to create a RewriteRule in .htaccess for a Magento website | I am currently trying to put a RewriteRule into my.htaccess file for my Magento website that will allow me to write a category URL in the following way: http://mydomain.com/dir/ /order/ /.html What I am basically looking to do is use my robots.txt file to make some of the category URLs not appear (specifically when you... | I tried with this on my server RewriteRule ^(.*)/dir/(.*?)/order/(.*?)/(.*?)$ $4.html?dir=$2ℴ=$3 [R,L] and when i issue request http://myserver/dir/asc/order/sales_index/footwear/mens-work-boots/motorcycle-boots.html i get proper redirection to http://yuave.dev:81/footwear/mens-work-boots/motorcycle-boots.html.html?dir... | Need to create a RewriteRule in .htaccess for a Magento website I am currently trying to put a RewriteRule into my.htaccess file for my Magento website that will allow me to write a category URL in the following way: http://mydomain.com/dir/ /order/ /.html What I am basically looking to do is use my robots.txt file to ... | TITLE:
Need to create a RewriteRule in .htaccess for a Magento website
QUESTION:
I am currently trying to put a RewriteRule into my.htaccess file for my Magento website that will allow me to write a category URL in the following way: http://mydomain.com/dir/ /order/ /.html What I am basically looking to do is use my r... | [
"apache",
".htaccess",
"mod-rewrite",
"magento"
] | 3 | 1 | 1,067 | 1 | 0 | 2011-05-31T18:30:58.917000 | 2011-05-31T20:42:30.117000 |
6,191,902 | 6,193,195 | Scrapy output feed international unicode characters (e.g. Japanese chars) | I'm a newbie to python and scrapy and I'm following the dmoz tutorial. As a minor variant to the tutorial's suggested start URL, I chose a Japanese category from the dmoz sample site and noticed that the feed export I eventually get shows the unicode numeric values instead of the actual Japanese characters. It seems li... | When you scrape the text from the page it is stored in Unicode. What you want to do is encode it into something like UTF8. unicode_string.encode('utf-8') Also, when you extract the text using your selector, it is stored in a list even if there is only one result, so you need to pick the first element. | Scrapy output feed international unicode characters (e.g. Japanese chars) I'm a newbie to python and scrapy and I'm following the dmoz tutorial. As a minor variant to the tutorial's suggested start URL, I chose a Japanese category from the dmoz sample site and noticed that the feed export I eventually get shows the uni... | TITLE:
Scrapy output feed international unicode characters (e.g. Japanese chars)
QUESTION:
I'm a newbie to python and scrapy and I'm following the dmoz tutorial. As a minor variant to the tutorial's suggested start URL, I chose a Japanese category from the dmoz sample site and noticed that the feed export I eventually... | [
"python",
"unicode",
"scrapy"
] | 7 | 1 | 3,186 | 1 | 0 | 2011-05-31T18:31:04.893000 | 2011-05-31T20:29:58.843000 |
6,191,903 | 6,200,564 | Send email after Paypal Express Checkout order completes | I'm trying to subscribe a client to an AWeber mailing list upon ordering a product on a website. I've completed the ordering process, and I also have my server sending an email to AWeber to enlist the client. For some reason the emails bounce when sent from my server (due to a DNS error) and the ISP doesn't know how to... | Why not create a script which will be triggered via PayPal IPN and when triggered, subscribes the email address through Aweber API (https://labs.aweber.com/)? Use their API instead of sending an email to subscribe an email address. | Send email after Paypal Express Checkout order completes I'm trying to subscribe a client to an AWeber mailing list upon ordering a product on a website. I've completed the ordering process, and I also have my server sending an email to AWeber to enlist the client. For some reason the emails bounce when sent from my se... | TITLE:
Send email after Paypal Express Checkout order completes
QUESTION:
I'm trying to subscribe a client to an AWeber mailing list upon ordering a product on a website. I've completed the ordering process, and I also have my server sending an email to AWeber to enlist the client. For some reason the emails bounce wh... | [
"php",
"api",
"email",
"paypal",
"express-checkout"
] | 0 | 1 | 1,257 | 1 | 0 | 2011-05-31T18:31:16.747000 | 2011-06-01T11:44:11.583000 |
6,191,905 | 6,191,950 | using `$(RM)` instead of `rm -rf` in makefile | I use a lot of rm -rf in my makefiles for cleanup. A couple weeks ago I found $(RM) which seems more general, but it expands to rm -f on my machine. How can I get recursive deletion with the general form? | $(RM) -rf is what I usually see (even though the -f is redundant). You can also create a common Makefile to define your own RM = rm -rf and then include it from the Makefiles in your project. | using `$(RM)` instead of `rm -rf` in makefile I use a lot of rm -rf in my makefiles for cleanup. A couple weeks ago I found $(RM) which seems more general, but it expands to rm -f on my machine. How can I get recursive deletion with the general form? | TITLE:
using `$(RM)` instead of `rm -rf` in makefile
QUESTION:
I use a lot of rm -rf in my makefiles for cleanup. A couple weeks ago I found $(RM) which seems more general, but it expands to rm -f on my machine. How can I get recursive deletion with the general form?
ANSWER:
$(RM) -rf is what I usually see (even thou... | [
"makefile"
] | 1 | 3 | 1,081 | 2 | 0 | 2011-05-31T18:31:33.317000 | 2011-05-31T18:36:09.900000 |
6,191,909 | 6,191,956 | Does Java´s BufferedReader leaves bytes in its internal buffer after a readline() call? | I´m having a problem, in my server, after I send a file with X bytes, I send a string saying this file is over and another file is coming, like FILE: a SIZE: Y\r\n send Y bytes FILE a FINISHED\r\n FILE b SIZE: Z\r\n send Z byes FILE b FINISHED\r\n FILES FINISHED\r\n In my client it does not recive properly. I use readl... | There's no readLine() calls in the code here, but to answer your question; Yes, calling BufferedReader.readLine() might very well leave stuff around in its internal buffer. It's buffering the input. If you wrap one of your InputStream in a BufferedReader, you can't really get much sane behavior if you read from the Buf... | Does Java´s BufferedReader leaves bytes in its internal buffer after a readline() call? I´m having a problem, in my server, after I send a file with X bytes, I send a string saying this file is over and another file is coming, like FILE: a SIZE: Y\r\n send Y bytes FILE a FINISHED\r\n FILE b SIZE: Z\r\n send Z byes FILE... | TITLE:
Does Java´s BufferedReader leaves bytes in its internal buffer after a readline() call?
QUESTION:
I´m having a problem, in my server, after I send a file with X bytes, I send a string saying this file is over and another file is coming, like FILE: a SIZE: Y\r\n send Y bytes FILE a FINISHED\r\n FILE b SIZE: Z\r\... | [
"java",
"file",
"sockets",
"transfer"
] | 0 | 5 | 877 | 4 | 0 | 2011-05-31T18:32:13.610000 | 2011-05-31T18:36:40.287000 |
6,191,913 | 6,192,554 | how to change/reset custom theme from Java code in android | I have a change theme option in setting screen of my application and providing some custom themes to choose from. first of all i believe you can't set theme to entire app from your java code at once (please guide if there is any way to do so ), thats why i am calling setTheme(my_theme) before super.onCreate() in every ... | Yeah, as the docs say, you need to set the theme before any views are instantiated, so it looks like you will need to restart your entire activity. There's probably a better way, but one way to ensure your activities completely restart in onResume(): finish(); startActivity(getIntent()); This will recycle the existing ... | how to change/reset custom theme from Java code in android I have a change theme option in setting screen of my application and providing some custom themes to choose from. first of all i believe you can't set theme to entire app from your java code at once (please guide if there is any way to do so ), thats why i am c... | TITLE:
how to change/reset custom theme from Java code in android
QUESTION:
I have a change theme option in setting screen of my application and providing some custom themes to choose from. first of all i believe you can't set theme to entire app from your java code at once (please guide if there is any way to do so )... | [
"android"
] | 1 | 1 | 1,652 | 1 | 0 | 2011-05-31T18:32:33.017000 | 2011-05-31T19:28:58.817000 |
6,191,921 | 6,192,058 | pre build and post build events | Q: I'm still searching how to perform what i wanna to do.. I have a DLL (set of classes contain connection to data base,...etc) which is common among several applications. My goal is: any change or modification to this DLL reflect to all the applications use this DLL.i don't want to republish the DLL in all application... | The GAC will work fine for you. HOWEVER you must trigger a recompile in your applications. Also if you compile other applications that use this library as a project reference, they will update their reference when you perform the compile and copy the updated library. If you all reference the gac - drop the file into th... | pre build and post build events Q: I'm still searching how to perform what i wanna to do.. I have a DLL (set of classes contain connection to data base,...etc) which is common among several applications. My goal is: any change or modification to this DLL reflect to all the applications use this DLL.i don't want to repu... | TITLE:
pre build and post build events
QUESTION:
Q: I'm still searching how to perform what i wanna to do.. I have a DLL (set of classes contain connection to data base,...etc) which is common among several applications. My goal is: any change or modification to this DLL reflect to all the applications use this DLL.i ... | [
".net",
"asp.net",
"visual-studio-2008",
"dll",
"batch-file"
] | 0 | 1 | 697 | 2 | 0 | 2011-05-31T18:33:01.020000 | 2011-05-31T18:45:29.663000 |
6,191,923 | 6,205,565 | Exception thrown while starting JBoss 6 | When I start JBoss 6 through Eclipse (Helios) without deploying any application it starts without a problem. When I deploy my ear it throws the following exception which does not reference my project at all. Any help would be appreciated. WARN [ClassLoaderManager] Unexpected error during load of:org.apache.taglibs.stan... | Problem solved. I removed the two JSTL jars of the web project from WEB-INF/lib (jstl-api-1.2.jar and jstl-impl-1.2.jar) and there are no errors. | Exception thrown while starting JBoss 6 When I start JBoss 6 through Eclipse (Helios) without deploying any application it starts without a problem. When I deploy my ear it throws the following exception which does not reference my project at all. Any help would be appreciated. WARN [ClassLoaderManager] Unexpected erro... | TITLE:
Exception thrown while starting JBoss 6
QUESTION:
When I start JBoss 6 through Eclipse (Helios) without deploying any application it starts without a problem. When I deploy my ear it throws the following exception which does not reference my project at all. Any help would be appreciated. WARN [ClassLoaderManage... | [
"eclipse",
"java-ee-6",
"jboss6.x"
] | 0 | 0 | 1,985 | 1 | 0 | 2011-05-31T18:33:05.797000 | 2011-06-01T17:54:43.457000 |
6,191,926 | 6,192,002 | Creating Predicate in To-Many Relationship | Say some Business can belong to several districts (given that different people call the same place differently). Say I want to find businesses whose one of the district contain @"Mangga" So Business have relationship called Districts to a bunch of District entity and each District contains an attribute called name How ... | You'll need the ANY keyword: NSPredicate *p = [NSPredicate predicateWithFormat:@"ANY districts.name = 'Mangga'"]; | Creating Predicate in To-Many Relationship Say some Business can belong to several districts (given that different people call the same place differently). Say I want to find businesses whose one of the district contain @"Mangga" So Business have relationship called Districts to a bunch of District entity and each Dist... | TITLE:
Creating Predicate in To-Many Relationship
QUESTION:
Say some Business can belong to several districts (given that different people call the same place differently). Say I want to find businesses whose one of the district contain @"Mangga" So Business have relationship called Districts to a bunch of District en... | [
"objective-c",
"xcode",
"xcode4",
"nspredicate"
] | 0 | 2 | 518 | 1 | 0 | 2011-05-31T18:33:24.903000 | 2011-05-31T18:40:35.467000 |
6,191,934 | 6,193,430 | mousedown on scrollTop : return false - problem | i found a code here, to let the mouse on the click and scroll the content of a div. But, when i try it, the return false or preventDefault doesn't prevent the click, and relaunch the page. Do you know how i could make this code work? the alert works well, but then the code refresh the page: var scrolling = false; $('#c... | You need to preventDefault() on the click specifically. You should be able to do something like this: $('#cat-diapo').find('#lien-fleche-cat').bind({ mousedown: function(){ var sous_cat = $(this).parent().prev('.sous-cat'); scrolling = true; alert('allop'); }, click: function(e){ e.preventDefault(); } }); That is just ... | mousedown on scrollTop : return false - problem i found a code here, to let the mouse on the click and scroll the content of a div. But, when i try it, the return false or preventDefault doesn't prevent the click, and relaunch the page. Do you know how i could make this code work? the alert works well, but then the cod... | TITLE:
mousedown on scrollTop : return false - problem
QUESTION:
i found a code here, to let the mouse on the click and scroll the content of a div. But, when i try it, the return false or preventDefault doesn't prevent the click, and relaunch the page. Do you know how i could make this code work? the alert works well... | [
"jquery",
"scrolltop",
"mousedown"
] | 0 | 0 | 817 | 2 | 0 | 2011-05-31T18:34:41.363000 | 2011-05-31T20:53:01.337000 |
6,191,938 | 6,216,267 | ClickOnce - Secure Alternative to ActiveX for Launching Local Application from IE? | Need to have ASP.NET page running on intranet launch a local windows application (VB6 exe). Originally planning to use an ActiveX control, however general security concerns with ActiveX controls (real and perceptual) have led us to consider a ClickOnce approach to the problem. The user would click on a link that would ... | Is there a reason why you couldn't simply publish the application that you want to launch as a ClickOnce application? When a ClickOnce application is published, it always checks the server for any updates and, if there are none, it launches the cached installation of the application. This is the same effect as the "lau... | ClickOnce - Secure Alternative to ActiveX for Launching Local Application from IE? Need to have ASP.NET page running on intranet launch a local windows application (VB6 exe). Originally planning to use an ActiveX control, however general security concerns with ActiveX controls (real and perceptual) have led us to consi... | TITLE:
ClickOnce - Secure Alternative to ActiveX for Launching Local Application from IE?
QUESTION:
Need to have ASP.NET page running on intranet launch a local windows application (VB6 exe). Originally planning to use an ActiveX control, however general security concerns with ActiveX controls (real and perceptual) ha... | [
"security",
"internet-explorer",
"activex",
"clickonce"
] | 0 | 1 | 648 | 1 | 0 | 2011-05-31T18:35:11.553000 | 2011-06-02T14:57:54.840000 |
6,191,942 | 6,195,978 | Distributing pre-built libraries with python modules | I use the following script to distribute a module containing pure python code. from distutils.core import setup, Extension import os setup (name = 'mtester', version = '0.1', description = 'Python wrapper for libmtester', packages=['mtester'], package_dir={'mtester':'module'}, ) The problem I have is, I modified one of... | Unfortunately package_data looks for files relative to the top of the package. One fix is to move the helper library under the module dir with the rest of the code: % mv lib64/mhelper.so module/ Then modify the package_data argument accordingly: package_data = {'mtester': ['mhelper.so']}... Then test: % python setup.py... | Distributing pre-built libraries with python modules I use the following script to distribute a module containing pure python code. from distutils.core import setup, Extension import os setup (name = 'mtester', version = '0.1', description = 'Python wrapper for libmtester', packages=['mtester'], package_dir={'mtester':... | TITLE:
Distributing pre-built libraries with python modules
QUESTION:
I use the following script to distribute a module containing pure python code. from distutils.core import setup, Extension import os setup (name = 'mtester', version = '0.1', description = 'Python wrapper for libmtester', packages=['mtester'], packa... | [
"python",
"distutils"
] | 5 | 2 | 2,586 | 1 | 0 | 2011-05-31T18:35:23.767000 | 2011-06-01T03:31:50.363000 |
6,191,944 | 6,192,107 | Consistent integer division with floating point operations | I need to do integer division in JavaScript, which only gives me double-precision floating point numbers to work with. Normally I would just do Math.floor(a / b) (or a / b | 0 ) and be done with it, but in this case I'm doing simulation executed in lockstep and need to ensure consistency across machines and runtimes re... | My guess would be no. And the answer would be that it's dependent upon a number of factors: Browser vendor implementations of ECMA Script. Whether or not a particular version of ECMA Script specifies that level of consistency (typically not). Other, external factors on the end-users' machines that you may not be aware ... | Consistent integer division with floating point operations I need to do integer division in JavaScript, which only gives me double-precision floating point numbers to work with. Normally I would just do Math.floor(a / b) (or a / b | 0 ) and be done with it, but in this case I'm doing simulation executed in lockstep and... | TITLE:
Consistent integer division with floating point operations
QUESTION:
I need to do integer division in JavaScript, which only gives me double-precision floating point numbers to work with. Normally I would just do Math.floor(a / b) (or a / b | 0 ) and be done with it, but in this case I'm doing simulation execut... | [
"javascript",
"floating-point",
"integer-division"
] | 4 | 2 | 1,139 | 1 | 0 | 2011-05-31T18:35:39.257000 | 2011-05-31T18:50:19.873000 |
6,191,947 | 6,191,993 | What is the purpose of message handler INT_PTR return value? | I was playing with visual studio's windows forms and the example code had this: INT_PTR CALLBACK About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) /*code cut*/ case WM_INITDIALOG: return (INT_PTR)TRUE; break; While my other handler function looks like this: LRESULT CALLBACK WndProc(HWND hWnd, UINT message, W... | The first piece of code is a DialogProc -- quoting the relevant docs: Return Value Type: INT_PTR Typically, the dialog box procedure should return TRUE if it processed the message, and FALSE if it did not. If the dialog box procedure returns FALSE, the dialog manager performs the default dialog operation in response to... | What is the purpose of message handler INT_PTR return value? I was playing with visual studio's windows forms and the example code had this: INT_PTR CALLBACK About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) /*code cut*/ case WM_INITDIALOG: return (INT_PTR)TRUE; break; While my other handler function looks l... | TITLE:
What is the purpose of message handler INT_PTR return value?
QUESTION:
I was playing with visual studio's windows forms and the example code had this: INT_PTR CALLBACK About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) /*code cut*/ case WM_INITDIALOG: return (INT_PTR)TRUE; break; While my other handle... | [
"c++",
"visual-studio-2008",
"winapi",
"visual-c++"
] | 2 | 5 | 2,967 | 2 | 0 | 2011-05-31T18:35:56.280000 | 2011-05-31T18:39:57.230000 |
6,191,949 | 6,232,825 | Heroku Taps: pushing my DB to heroku gives error | I get this error:! Taps >= v0.3.22 is required for this server I have no idea how to fix it.... it seems that everyone has had slightly different problems with taps. My taps version is 0.3.23 > heroku version heroku-gem/1.18.2
> gem list | grep heroku heroku (2.2.1) | a guess, but perhaps try running: gem update taps or even removing the gem and installing it again. | Heroku Taps: pushing my DB to heroku gives error I get this error:! Taps >= v0.3.22 is required for this server I have no idea how to fix it.... it seems that everyone has had slightly different problems with taps. My taps version is 0.3.23 > heroku version heroku-gem/1.18.2
> gem list | grep heroku heroku (2.2.1) | TITLE:
Heroku Taps: pushing my DB to heroku gives error
QUESTION:
I get this error:! Taps >= v0.3.22 is required for this server I have no idea how to fix it.... it seems that everyone has had slightly different problems with taps. My taps version is 0.3.23 > heroku version heroku-gem/1.18.2
> gem list | grep heroku ... | [
"ruby-on-rails",
"ruby",
"heroku"
] | 0 | 1 | 302 | 1 | 0 | 2011-05-31T18:36:02.330000 | 2011-06-03T21:22:31.467000 |
6,191,955 | 6,192,023 | Hibernate sql query error | following is the query: Query q = getSession().createQuery("FROM secroles WHERE secroles.SR_ORG =:srOrg, secroles.SR_PROFILE=:srUser, ISDELETED=:isDeleted"); error: org.hibernate.hql.ast.QuerySyntaxException: unexpected token:, near line 1, column 37 [FROM secroles WHERE SR_ORG =:srOrg, SR_PROFILE=:srUser, ISDELETED =:... | You put, instead of AND, I presume. Also you should use class property names not column names. So probably secroles.srOrg instead of secroles.SR_ORG | Hibernate sql query error following is the query: Query q = getSession().createQuery("FROM secroles WHERE secroles.SR_ORG =:srOrg, secroles.SR_PROFILE=:srUser, ISDELETED=:isDeleted"); error: org.hibernate.hql.ast.QuerySyntaxException: unexpected token:, near line 1, column 37 [FROM secroles WHERE SR_ORG =:srOrg, SR_PRO... | TITLE:
Hibernate sql query error
QUESTION:
following is the query: Query q = getSession().createQuery("FROM secroles WHERE secroles.SR_ORG =:srOrg, secroles.SR_PROFILE=:srUser, ISDELETED=:isDeleted"); error: org.hibernate.hql.ast.QuerySyntaxException: unexpected token:, near line 1, column 37 [FROM secroles WHERE SR_O... | [
"sql",
"database",
"hibernate"
] | 0 | 2 | 687 | 3 | 0 | 2011-05-31T18:36:34.003000 | 2011-05-31T18:42:01.067000 |
6,191,957 | 6,192,197 | Travelling on a Tree While Incrementing A Field - Static Problem | Hey Folks, I have a tree and using proper fields and variables, I want to calculate total traveling time of a tree. Here is my code: private double time = 0;..........................................
public static double time(TreeNode tree{ City A = tree.getCity(); if (tree.hasLeftChild()){ time += tree.getLeftChild()... | Without going into the details of variable attributes, I will simply note that you wrote a recursive function which is returning a variable. I suggest you actually use that return and do whatever is necessary to assign the value at the end. Something like public static double time(TreeNode tree{ double thistime = 0.0; ... | Travelling on a Tree While Incrementing A Field - Static Problem Hey Folks, I have a tree and using proper fields and variables, I want to calculate total traveling time of a tree. Here is my code: private double time = 0;..........................................
public static double time(TreeNode tree{ City A = tree... | TITLE:
Travelling on a Tree While Incrementing A Field - Static Problem
QUESTION:
Hey Folks, I have a tree and using proper fields and variables, I want to calculate total traveling time of a tree. Here is my code: private double time = 0;..........................................
public static double time(TreeNode t... | [
"algorithm"
] | 0 | 0 | 35 | 1 | 0 | 2011-05-31T18:36:43.237000 | 2011-05-31T18:59:21.647000 |
6,191,959 | 6,192,160 | What are # and : used for in Qbasic? | I have a legacy code doing math calculations. It is reportedly written in QBasic, and runs under VB6 successfully. I plan to write the code into a newer language/platform. For which I must first work backwards and come up with a detailed algorithm from existing code. The problem is I can't understand syntax of few line... | : is the line continuation character, it allows you to chain multiple statements on the same line. a(i) = b: a(i+N) = c is equivalent to: a(i)=b a(i+N)=c # is a type specifier. It specifies that the number it follows should be treated as a double. | What are # and : used for in Qbasic? I have a legacy code doing math calculations. It is reportedly written in QBasic, and runs under VB6 successfully. I plan to write the code into a newer language/platform. For which I must first work backwards and come up with a detailed algorithm from existing code. The problem is ... | TITLE:
What are # and : used for in Qbasic?
QUESTION:
I have a legacy code doing math calculations. It is reportedly written in QBasic, and runs under VB6 successfully. I plan to write the code into a newer language/platform. For which I must first work backwards and come up with a detailed algorithm from existing cod... | [
"legacy-code",
"qbasic"
] | 1 | 4 | 320 | 2 | 0 | 2011-05-31T18:36:49.120000 | 2011-05-31T18:55:48.523000 |
6,191,962 | 6,191,978 | What's wrong with how I'm declaring this Javascript variable? | I have an object called TruckModel which is defined earlier in my JavaScript file called milktruck.js I'm trying to create an array of these TruckModel objects because I don't know at any given time how many TruckModel objects will be needed as players of my multiplayer game enter and exit. I know that my current code ... | If you want to be able to find the objects by numeric index, you want an array, not a plain object: var opponentTrucks = []; What you've got will work, kind-of, but there's no reason not to use a real array if you're going to treat it like one anyway. edit — it's still not really clear exactly what the problem is. This... | What's wrong with how I'm declaring this Javascript variable? I have an object called TruckModel which is defined earlier in my JavaScript file called milktruck.js I'm trying to create an array of these TruckModel objects because I don't know at any given time how many TruckModel objects will be needed as players of my... | TITLE:
What's wrong with how I'm declaring this Javascript variable?
QUESTION:
I have an object called TruckModel which is defined earlier in my JavaScript file called milktruck.js I'm trying to create an array of these TruckModel objects because I don't know at any given time how many TruckModel objects will be neede... | [
"javascript",
"arrays",
"variables",
"object",
"declaration"
] | 0 | 2 | 115 | 2 | 0 | 2011-05-31T18:36:58.887000 | 2011-05-31T18:38:22.673000 |
6,191,965 | 6,192,705 | WPF composite Windows and ViewModels | I have a WPF Window which contains few UserControls, those controls contain another. And now, what is the most principal way how to create ViewModel for this Window and where to bind it. I do expect that one firstly needs to create ViewModel for each of sub-controls. | There are a few ways to do this. Inject the VM I would recommend this method. If your window is created in the App class like var window = new MyWindow(); window.Show(); I would assign the VM before showing the window: var window = new MyWindow(); window.DataContext = GetDataContextForWindow(); window.Show(); If one of... | WPF composite Windows and ViewModels I have a WPF Window which contains few UserControls, those controls contain another. And now, what is the most principal way how to create ViewModel for this Window and where to bind it. I do expect that one firstly needs to create ViewModel for each of sub-controls. | TITLE:
WPF composite Windows and ViewModels
QUESTION:
I have a WPF Window which contains few UserControls, those controls contain another. And now, what is the most principal way how to create ViewModel for this Window and where to bind it. I do expect that one firstly needs to create ViewModel for each of sub-control... | [
"c#",
".net",
"wpf",
"data-binding",
"mvvm"
] | 5 | 4 | 1,633 | 4 | 0 | 2011-05-31T18:37:17.743000 | 2011-05-31T19:45:16.287000 |
6,191,966 | 6,192,082 | References in Python | I have a multicasting network that needs to continuously send data to all other users. This data will be changing constantly so I do not want the programmer to have to deal with the sending of packets to users. Because of this, I am trying to find out how I can make a reference to any object or variable in Python (I am... | In python everything is a reference, but strings are not mutable. So test is holding a reference to "test". If you assign "this should change" to test you just change it to another reference. But your clients still have the reference to "test". Or shorter: It does not work that way in python!;-) A solution might be to ... | References in Python I have a multicasting network that needs to continuously send data to all other users. This data will be changing constantly so I do not want the programmer to have to deal with the sending of packets to users. Because of this, I am trying to find out how I can make a reference to any object or var... | TITLE:
References in Python
QUESTION:
I have a multicasting network that needs to continuously send data to all other users. This data will be changing constantly so I do not want the programmer to have to deal with the sending of packets to users. Because of this, I am trying to find out how I can make a reference to... | [
"python",
"pointers",
"reference"
] | 8 | 5 | 5,094 | 2 | 0 | 2011-05-31T18:37:20.893000 | 2011-05-31T18:48:21.323000 |
6,191,968 | 6,192,005 | When are win form controls data bound? | I have a bunch of controls in a tab control on a windows form. Some of the controls are data bound. I'm attempting to access the values of the controls but some of the controls seem to not have values until i physically navigate to the form that has the control. When are controls data bound? Do they have to be displaye... | I had accurately same problem,whenever i wanted to read combobox default value from unnanvigated tabpages was returning null,and i founddatabanding occures aftercontrol show, and what i did,was writing this function protected virtual void SetComboData(System.Windows.Forms.Control parentCtrl, DataRow r) { foreach (Syste... | When are win form controls data bound? I have a bunch of controls in a tab control on a windows form. Some of the controls are data bound. I'm attempting to access the values of the controls but some of the controls seem to not have values until i physically navigate to the form that has the control. When are controls ... | TITLE:
When are win form controls data bound?
QUESTION:
I have a bunch of controls in a tab control on a windows form. Some of the controls are data bound. I'm attempting to access the values of the controls but some of the controls seem to not have values until i physically navigate to the form that has the control. ... | [
"c#",
"winforms",
"visual-studio-2008",
"data-binding"
] | 1 | 1 | 267 | 2 | 0 | 2011-05-31T18:37:23.907000 | 2011-05-31T18:40:51.490000 |
6,191,969 | 6,192,022 | Lang ToStringBuilder request parameters logging | I need to log all the request parameters in some situations for debug purposes... I tried using ToStringBuilder.reflectionToString(request), but it still showed memory addresses Is there any easy way to log request parameters in plain text so that I could do something logger.info(ToStringBuilder.reflectionToString(requ... | reflectionToString only uses reflection on the object given, to find the attributes to print. The attributes themselves are output using their toString() methods. Neither the request nor the parameter map have the request parameters you are interested in as direct attributes, so reflectionToString fails for you. I know... | Lang ToStringBuilder request parameters logging I need to log all the request parameters in some situations for debug purposes... I tried using ToStringBuilder.reflectionToString(request), but it still showed memory addresses Is there any easy way to log request parameters in plain text so that I could do something log... | TITLE:
Lang ToStringBuilder request parameters logging
QUESTION:
I need to log all the request parameters in some situations for debug purposes... I tried using ToStringBuilder.reflectionToString(request), but it still showed memory addresses Is there any easy way to log request parameters in plain text so that I coul... | [
"java",
"log4j",
"request",
"apache-commons"
] | 1 | 3 | 2,257 | 2 | 0 | 2011-05-31T18:37:28.970000 | 2011-05-31T18:41:57.473000 |
6,191,975 | 6,192,558 | Crystal Reports - Passing value from one parameter to another | Crystal Version: 2008 I have 2 date parameters (start date and end date). I want to create an initial Boolean parameter; that if, 'True' automatically sets the 2 date parameters to specific dates, if 'False' the user enters the start date and end date. Basically, I want to create a parameter to drive another parameter.... | I think you should be able to use shared variables to accomplish this. You can set the values in a formula field the report header and then use the shared variables (instead of the date parameters) in your formulas. I don't believe this will work for your main reports selection criteria though. To use it in that method... | Crystal Reports - Passing value from one parameter to another Crystal Version: 2008 I have 2 date parameters (start date and end date). I want to create an initial Boolean parameter; that if, 'True' automatically sets the 2 date parameters to specific dates, if 'False' the user enters the start date and end date. Basic... | TITLE:
Crystal Reports - Passing value from one parameter to another
QUESTION:
Crystal Version: 2008 I have 2 date parameters (start date and end date). I want to create an initial Boolean parameter; that if, 'True' automatically sets the 2 date parameters to specific dates, if 'False' the user enters the start date a... | [
"parameters",
"crystal-reports",
"crystal-reports-2008"
] | 1 | 0 | 2,907 | 2 | 0 | 2011-05-31T18:38:15.047000 | 2011-05-31T19:29:32.157000 |
6,191,983 | 6,192,103 | scaling and centering UITextFields | I have a loginviewcontroller, with 2 UITextField, username, password, a button and a UIImageView. This should work over a portrait and landscape mode. However in my landscape mode I want to be able to center all of these elements. How do I do this? Also I would need to scale the size of the elements so that it is appro... | You can set the "contentMode" on your views. This will tell the super view how the subviews should be scaled and positioned when redraw or layout happens. You can also manually position and set the textAlignment etc. in the: - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
... | scaling and centering UITextFields I have a loginviewcontroller, with 2 UITextField, username, password, a button and a UIImageView. This should work over a portrait and landscape mode. However in my landscape mode I want to be able to center all of these elements. How do I do this? Also I would need to scale the size ... | TITLE:
scaling and centering UITextFields
QUESTION:
I have a loginviewcontroller, with 2 UITextField, username, password, a button and a UIImageView. This should work over a portrait and landscape mode. However in my landscape mode I want to be able to center all of these elements. How do I do this? Also I would need ... | [
"iphone",
"objective-c",
"ipad"
] | 0 | 0 | 84 | 1 | 0 | 2011-05-31T18:39:14.993000 | 2011-05-31T18:49:48.697000 |
6,191,986 | 6,192,057 | Equivalent in ruby of PHP's .= operator? | I'm looking to concatenate a string in a loop, like this, but in Ruby: $fizz = file_get_contents($_SERVER['argv'][1]); $output = ""; for($i=1;$i<=$fizz;$i++) { if($i % 3 == 0 &&!($i % 5 ==0)) { $output.= "fizz\n"; } else if($i % 5 == 0 &&!($i % 3 ==0)) { $output.= "buzz\n"; } else if($i % 3 == 0 && $i % 5 == 0) { $outp... | You are looking for Ruby's String#<<. So, your code might look like this: variable << "fizz\n" Here is the documentation for the << (aka concat) method. | Equivalent in ruby of PHP's .= operator? I'm looking to concatenate a string in a loop, like this, but in Ruby: $fizz = file_get_contents($_SERVER['argv'][1]); $output = ""; for($i=1;$i<=$fizz;$i++) { if($i % 3 == 0 &&!($i % 5 ==0)) { $output.= "fizz\n"; } else if($i % 5 == 0 &&!($i % 3 ==0)) { $output.= "buzz\n"; } el... | TITLE:
Equivalent in ruby of PHP's .= operator?
QUESTION:
I'm looking to concatenate a string in a loop, like this, but in Ruby: $fizz = file_get_contents($_SERVER['argv'][1]); $output = ""; for($i=1;$i<=$fizz;$i++) { if($i % 3 == 0 &&!($i % 5 ==0)) { $output.= "fizz\n"; } else if($i % 5 == 0 &&!($i % 3 ==0)) { $outpu... | [
"php",
"ruby"
] | 1 | 5 | 256 | 4 | 0 | 2011-05-31T18:39:24.203000 | 2011-05-31T18:45:18.327000 |
6,191,989 | 6,192,089 | Pop elements out of an array using JS | I have an array results = [duplicate, otherdup] that contains a list of duplicates I have a regular original_array = [duplicate, duplicate, duplicate, otherdup, otherdup, unique, unique2, unique_etc] How do I iterate through the results array (list) and Pop all but one from the original_array to look like this: oringal... | A simple unique function could look something like this: Array.prototype.unique = function() { var uniqueArr = []; var dict = {}; for(var i = 0; i < this.length; i++) { if(!(this[i] in dict)) { uniqueArr.push(this[i]); dict[this[i]] = 1; } }
return uniqueArr; }; You could then easily do: var unique_array = original_ar... | Pop elements out of an array using JS I have an array results = [duplicate, otherdup] that contains a list of duplicates I have a regular original_array = [duplicate, duplicate, duplicate, otherdup, otherdup, unique, unique2, unique_etc] How do I iterate through the results array (list) and Pop all but one from the ori... | TITLE:
Pop elements out of an array using JS
QUESTION:
I have an array results = [duplicate, otherdup] that contains a list of duplicates I have a regular original_array = [duplicate, duplicate, duplicate, otherdup, otherdup, unique, unique2, unique_etc] How do I iterate through the results array (list) and Pop all bu... | [
"javascript",
"jquery",
"arrays",
"loops"
] | 0 | 1 | 1,055 | 3 | 0 | 2011-05-31T18:39:40.647000 | 2011-05-31T18:48:39.943000 |
6,191,992 | 6,192,066 | Can't seem to change color of link | Here's a screenshot of the problem: Notice that we're on the stalk page. The CSS I wrote is supposed to change the color of the active page. Here is the CSS: #nav { border-top:10px solid #A7C1D1; height:45px; padding-left:100px; padding-top:20px; margin-left:0; color:#000; }
#nav a { color:#000; text-decoration:none; ... | Use #nav a.active { color:#93AFBF; } The #nav a:visited has higher specificity w3 specs than #nav.active and thus gets applied. | Can't seem to change color of link Here's a screenshot of the problem: Notice that we're on the stalk page. The CSS I wrote is supposed to change the color of the active page. Here is the CSS: #nav { border-top:10px solid #A7C1D1; height:45px; padding-left:100px; padding-top:20px; margin-left:0; color:#000; }
#nav a {... | TITLE:
Can't seem to change color of link
QUESTION:
Here's a screenshot of the problem: Notice that we're on the stalk page. The CSS I wrote is supposed to change the color of the active page. Here is the CSS: #nav { border-top:10px solid #A7C1D1; height:45px; padding-left:100px; padding-top:20px; margin-left:0; color... | [
"css"
] | 4 | 6 | 15,085 | 6 | 0 | 2011-05-31T18:39:51.260000 | 2011-05-31T18:46:01.897000 |
6,191,995 | 6,196,689 | Registering a TagAction for all instances of HTML.UnknownTag | I know that I can register a TagAction for a particular HTML.UnknownTag by doing something like this: public static final HTML.Tag MY_TAG = new HTML.UnknownTag("mytag");... registerTag( MY_TAG, new MyTagAction()); Is there a way I can register a TagAction for all instances of HTML.UnknownTag? | http://java-sl.com/custom_tag_html_kit.html See the sources class MyHTMLReader extends HTMLDocument.HTMLReader { public MyHTMLReader(int offset) { super(offset); } public void handleStartTag(HTML.Tag t, MutableAttributeSet a, int pos) { if (t.toString().equals("button")) { registerTag(t, new BlockAction()); } super.han... | Registering a TagAction for all instances of HTML.UnknownTag I know that I can register a TagAction for a particular HTML.UnknownTag by doing something like this: public static final HTML.Tag MY_TAG = new HTML.UnknownTag("mytag");... registerTag( MY_TAG, new MyTagAction()); Is there a way I can register a TagAction for... | TITLE:
Registering a TagAction for all instances of HTML.UnknownTag
QUESTION:
I know that I can register a TagAction for a particular HTML.UnknownTag by doing something like this: public static final HTML.Tag MY_TAG = new HTML.UnknownTag("mytag");... registerTag( MY_TAG, new MyTagAction()); Is there a way I can regist... | [
"java",
"swing"
] | 0 | 1 | 56 | 1 | 0 | 2011-05-31T18:39:59.040000 | 2011-06-01T05:28:56.933000 |
6,192,003 | 6,196,644 | Insecure world writable dir /Users/username in PATH, mode 040777 when running Ruby commands | When I run Ruby commands like gem -v I get this error: /Users/kristoffer/.rvm/rubies/ruby-1.9.2-p180/bin/gem:4: warning: Insecure world writable dir /Users/kristoffer in PATH, mode 040777 1.6.2 First of all I don't understand what this means. /Users/kristoffer is not in my path according to echo $PATH. The result of ec... | Your home folder should only be writable by you, not by anyone else. The reason gem is complaining about this is that you have folders in your PATH that are inside your (insecure) home folder, and that means that anyone who wants to could hack you by renaming/moving your.rvm folder and replacing it with an impostor. To... | Insecure world writable dir /Users/username in PATH, mode 040777 when running Ruby commands When I run Ruby commands like gem -v I get this error: /Users/kristoffer/.rvm/rubies/ruby-1.9.2-p180/bin/gem:4: warning: Insecure world writable dir /Users/kristoffer in PATH, mode 040777 1.6.2 First of all I don't understand wh... | TITLE:
Insecure world writable dir /Users/username in PATH, mode 040777 when running Ruby commands
QUESTION:
When I run Ruby commands like gem -v I get this error: /Users/kristoffer/.rvm/rubies/ruby-1.9.2-p180/bin/gem:4: warning: Insecure world writable dir /Users/kristoffer in PATH, mode 040777 1.6.2 First of all I d... | [
"ruby",
"macos",
"permissions",
"path"
] | 67 | 120 | 52,628 | 6 | 0 | 2011-05-31T18:40:37.937000 | 2011-06-01T05:22:08.187000 |
6,192,011 | 6,192,513 | How to prevent iostreams::mapped_file_sink from creating executable txt files | EDIT: code sample is broken, it is missing.is_open(), please DON'T use it. I have a rather strange question. I use boost iostreams and they work awesome, but the problem is that files that program creates are executable txt files(I'm on ubuntu,msg is:""lol2.txt" is an executable text file."). So is there any way to mak... | You can change the file creation mask of your process to create non-executable files by default: umask(getumask() & ~(S_IXUSR | S_IXGRP | S_IXOTH)); | How to prevent iostreams::mapped_file_sink from creating executable txt files EDIT: code sample is broken, it is missing.is_open(), please DON'T use it. I have a rather strange question. I use boost iostreams and they work awesome, but the problem is that files that program creates are executable txt files(I'm on ubunt... | TITLE:
How to prevent iostreams::mapped_file_sink from creating executable txt files
QUESTION:
EDIT: code sample is broken, it is missing.is_open(), please DON'T use it. I have a rather strange question. I use boost iostreams and they work awesome, but the problem is that files that program creates are executable txt ... | [
"c++",
"boost",
"boost-iostreams"
] | 2 | 3 | 468 | 1 | 0 | 2011-05-31T18:41:14.327000 | 2011-05-31T19:26:03.053000 |
6,192,012 | 6,192,640 | Javascript getDay returning incorrect values for April, June, September, November | I'm using this script located here: http://www.javascriptkit.com/script/script2/dyndateselector.shtml If you try it, and go to any of April, June, September or November, you will notice that the day of the week columns are incorrect. Here's a list of incorrect data (the x starts y stuff is showing the following month.)... | This is actually pretty interesting as i am guessing that tomorrow your original code will work as you want again. What i think is happening is you are creating a new Date and that will automaticly initialize to today (31th of may). Then you set the Month to June by which you basically say make it 31th of June. This da... | Javascript getDay returning incorrect values for April, June, September, November I'm using this script located here: http://www.javascriptkit.com/script/script2/dyndateselector.shtml If you try it, and go to any of April, June, September or November, you will notice that the day of the week columns are incorrect. Here... | TITLE:
Javascript getDay returning incorrect values for April, June, September, November
QUESTION:
I'm using this script located here: http://www.javascriptkit.com/script/script2/dyndateselector.shtml If you try it, and go to any of April, June, September or November, you will notice that the day of the week columns a... | [
"javascript"
] | 7 | 9 | 3,303 | 5 | 0 | 2011-05-31T18:41:14.970000 | 2011-05-31T19:38:08.877000 |
6,192,014 | 6,195,022 | Retrieving Mac OS X Proxy IP address | I'm trying to programmatically get the proxy IP address or URL set on a system. I found code that might work in a previous question here, but it's in Objective-C and what I am trying to use is plain C. I've tried translating that obj-c code to C but no success. Anyone knows how to get the system proxy in C? Thank you | This is a C translation of that answer: CFDictionaryRef proxies = SCDynamicStoreCopyProxies(NULL); if (proxies) { CFStringRef pacURL = (CFStringRef)CFDictionaryGetValue(proxies, kSCPropNetProxiesProxyAutoConfigURLString);
if (pacURL) { char url[257] = {}; CFStringGetCString(pacURL, url, sizeof url, kCFStringEncodingAS... | Retrieving Mac OS X Proxy IP address I'm trying to programmatically get the proxy IP address or URL set on a system. I found code that might work in a previous question here, but it's in Objective-C and what I am trying to use is plain C. I've tried translating that obj-c code to C but no success. Anyone knows how to g... | TITLE:
Retrieving Mac OS X Proxy IP address
QUESTION:
I'm trying to programmatically get the proxy IP address or URL set on a system. I found code that might work in a previous question here, but it's in Objective-C and what I am trying to use is plain C. I've tried translating that obj-c code to C but no success. Any... | [
"c",
"macos"
] | 6 | 4 | 2,102 | 1 | 0 | 2011-05-31T18:41:27.557000 | 2011-06-01T00:29:01.100000 |
6,192,015 | 6,199,911 | SVN merge help: Created branch within a trunk | Long story short, I essentially created a branch of development within our trunk. About two weeks ago I decided it would make sense to create a separate branch in our repository, as we're finally making the switch to visual studio 2010. I didn't read as much of the subversion book as I should have. Here's the basic str... | Hey, actually this is a bad practice to create a branch within trunk, but since this is done, there is a way to merge the code... Do not merge the complete trees, rather merge the individual folders. Eg; If you need to merge back the branch into trunk, 1. Merge the REPO/Installer directory with REPO/Installer/Upgrade/I... | SVN merge help: Created branch within a trunk Long story short, I essentially created a branch of development within our trunk. About two weeks ago I decided it would make sense to create a separate branch in our repository, as we're finally making the switch to visual studio 2010. I didn't read as much of the subversi... | TITLE:
SVN merge help: Created branch within a trunk
QUESTION:
Long story short, I essentially created a branch of development within our trunk. About two weeks ago I decided it would make sense to create a separate branch in our repository, as we're finally making the switch to visual studio 2010. I didn't read as mu... | [
"svn",
"merge",
"tortoisesvn"
] | 3 | 3 | 137 | 2 | 0 | 2011-05-31T18:41:29.447000 | 2011-06-01T10:45:20.477000 |
6,192,025 | 6,193,252 | Problem in displaying properly in tableView cell by using label | In my application I parsed the data through NSXMLParser and made separate class to store that data from which i usually display the data. Everything works fine in simulator except the the title which is display in table cell with image. Images appears properly but the title not appear properly. This is my code:- - (UIT... | My guess is that you need to enlarge the label height. Maybe the label height i not large enough to display 2 lines of text and that's could be the reason that you see only 1 line. in interface builder try to enlarge the label height. and maybe i am wrong? Good luck Shani | Problem in displaying properly in tableView cell by using label In my application I parsed the data through NSXMLParser and made separate class to store that data from which i usually display the data. Everything works fine in simulator except the the title which is display in table cell with image. Images appears prop... | TITLE:
Problem in displaying properly in tableView cell by using label
QUESTION:
In my application I parsed the data through NSXMLParser and made separate class to store that data from which i usually display the data. Everything works fine in simulator except the the title which is display in table cell with image. I... | [
"iphone",
"objective-c",
"ios",
"xcode4"
] | 0 | 0 | 419 | 2 | 0 | 2011-05-31T18:42:16.373000 | 2011-05-31T20:36:12.990000 |
6,192,026 | 6,192,442 | Long Queries in Oracle and SQL Server | I'm working on an app that will connect to either Oracle or SQL Server and builds up an SQL string to be executed on the server. What I've found is that my approach fails in Oracle when the SQL string exceeds ~4000 characters. I've got higher than 4000, but only slightly; I'm assuming Oracle ignores some whitespace/for... | the 32000 VARCHAR2 is only visible within PL/SQL (have a look @ this link http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:7032414607769 ). The SQL VARCHAR2 is, as you have noted, limited to 4000 characters. Since you are using an outside product (ie not PL/SQL but.net) you are thus limited to 4000k.... | Long Queries in Oracle and SQL Server I'm working on an app that will connect to either Oracle or SQL Server and builds up an SQL string to be executed on the server. What I've found is that my approach fails in Oracle when the SQL string exceeds ~4000 characters. I've got higher than 4000, but only slightly; I'm assum... | TITLE:
Long Queries in Oracle and SQL Server
QUESTION:
I'm working on an app that will connect to either Oracle or SQL Server and builds up an SQL string to be executed on the server. What I've found is that my approach fails in Oracle when the SQL string exceeds ~4000 characters. I've got higher than 4000, but only s... | [
".net",
"sql",
"sql-server",
"oracle"
] | 2 | 3 | 441 | 3 | 0 | 2011-05-31T18:42:23.313000 | 2011-05-31T19:18:16.090000 |
6,192,027 | 6,192,275 | Destructor Called Twice While No Copy Constructor or Assignment Operator Gets Callled | I have a class: class A { public: A() { std::cout << "Constructor called" << std::endl; }
~A() { std::cout << "Destructor called" << std::endl; }
A(const A& another) { std::cout << "Copy constructor called" << std::endl; }
A& operator=(const A& another) { std::cout << "Assignment operator= called" << std::endl; } };... | If you are somehow calling the destructor twice, maybe you have two objects that think they own it through a pointer. If you really do have two objects that think they own this one, consider using a reference counted pointer such as Boost::shared_ptr or tr1::shared_ptr to contain it. That way you don't have to worry ab... | Destructor Called Twice While No Copy Constructor or Assignment Operator Gets Callled I have a class: class A { public: A() { std::cout << "Constructor called" << std::endl; }
~A() { std::cout << "Destructor called" << std::endl; }
A(const A& another) { std::cout << "Copy constructor called" << std::endl; }
A& opera... | TITLE:
Destructor Called Twice While No Copy Constructor or Assignment Operator Gets Callled
QUESTION:
I have a class: class A { public: A() { std::cout << "Constructor called" << std::endl; }
~A() { std::cout << "Destructor called" << std::endl; }
A(const A& another) { std::cout << "Copy constructor called" << std:... | [
"c++",
"destructor"
] | 7 | 4 | 5,479 | 4 | 0 | 2011-05-31T18:42:28.393000 | 2011-05-31T19:06:23.313000 |
6,192,028 | 6,192,422 | casting member function pointer | I need to use a member function pointer that takes in an argument of base class that used in other code. Well, simply I want do to [something] like the example below. This code works fine, but I wonder if such cast is always safe? I cannot do dynamic or static cast here. #include class C { public: C (): c('c') {} virtu... | What you are trying to do cannot be done legally in C++. C++ does not support any kind of co-variance or contra-variance on function parameter types, regardless of whether this is a member function or a free function. In your situation the proper way to implement it is to introduce an intermediate function for paramete... | casting member function pointer I need to use a member function pointer that takes in an argument of base class that used in other code. Well, simply I want do to [something] like the example below. This code works fine, but I wonder if such cast is always safe? I cannot do dynamic or static cast here. #include class C... | TITLE:
casting member function pointer
QUESTION:
I need to use a member function pointer that takes in an argument of base class that used in other code. Well, simply I want do to [something] like the example below. This code works fine, but I wonder if such cast is always safe? I cannot do dynamic or static cast here... | [
"c++",
"pointers",
"casting",
"pointer-to-member",
"reinterpret-cast"
] | 5 | 2 | 9,307 | 4 | 0 | 2011-05-31T18:42:29.233000 | 2011-05-31T19:16:35.663000 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.