unified_texts stringlengths 32 30.1k | OpenStatus_id int64 0 4 | input_ids list | token_type_ids list | attention_mask list |
|---|---|---|---|---|
Run DOS Command for a Time Limit
===
I want to perform the following operations.
1. Read 1 word at a time from an input file consisting of many words.
2. Pass this word as an argument to another command line based application.
3. Run that application for a fixed amount of time, say 10 seconds.
4. Abort the execution of the application if it is still running after 10 seconds and go back, pick the next word from the input file and repeat steps 1 to 3.
Here is what I have written though it does not achieve exactly what I want it to:
@echo off
for /f %%i in ('type input.txt') do call:Routine %%i
:Routine
set app="myApp.exe"
set limit=60
%app% %1
goto Delay
:Delay
ping localhost -n %limit% > nul
The above script will introduce the delay after the execution of myApp has completed. However, I want it to run myApp.exe for not more than 10 seconds, if it does, then abort the application using taskkill and move on to the next word from the input file.
I searched for a solution online and came across this:
http://www.tech-archive.net/Archive/WinXP/microsoft.public.windowsxp.general/2006-04/msg03609.html
Though it does not answer my query exactly, I would like to make my code do something similar.
Thanks. | 0 | [
2,
485,
107,
18,
1202,
26,
21,
85,
4496,
800,
3726,
3726,
31,
259,
20,
2985,
14,
249,
1311,
9,
137,
9,
1302,
137,
833,
35,
21,
85,
37,
40,
6367,
3893,
4160,
16,
151,
715,
9,
172,
9,
1477,
48,
833,
28,
40,
5476,
20,
226,
12... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Looking for a Subversion branch monitoring tool (pending integrations to trunk)
===
I've been looking for a tool that helps to **track** different development and stabilization **branches that were not integrated to the trunk yet**. I've been looking in the web (including this site) with no sucess, since the tools I've found are intended for monitoring commits, but not for branches pending to be merged.
Conceptually, I would expect that the tool could take advantage of the mergeinfo property (well, the lack of it) and knowing the origin of a particular branch to show what branches are alive and need to be merged back to the trunk.
Do you know if there is such a tool?
If not, how do you track these usually?
Many thanks in advance.
Best regards, Gastón.- | 0 | [
2,
699,
26,
21,
972,
10898,
1686,
8984,
5607,
13,
5,
306,
7601,
8078,
18,
20,
6436,
6,
800,
3726,
3726,
31,
22,
195,
74,
699,
26,
21,
5607,
30,
7778,
20,
13,
1409,
4792,
1409,
421,
522,
17,
28766,
13,
1409,
23014,
160,
30,
46,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Entity-Framework InvalidCastException
===
This code compiles but generates a run-time error. Essentially, I'm simply executing a stored proc in entity-framework and attempting to return a single object. Any ideas on w
CODE:
public static TowingCustomerVehicle GetTowingCustomerVehicle(int vehicleID)
{
using (ProductServiceEntities context = new ProductServiceEntities())
{
TowingCustomerVehicle vehicle = (TowingCustomerVehicle)context.Vehicles
.Where(v => v.VehiclePK == vehicleID)
.Select(v => new TowingService2._0.Model.Towing.TowingCustomerVehicle
{
CurbWeight = (int)v.CurbWeight,
HitchSystemRating = (int)v.TowingCapacityMaximum,
FuelType = v.FuelType,
TopType = v.TopType,
TongueLoadRating = (v.TowingCapacityMaximum ?? 0),
IsCVT = v.IsAutoTransCVT ?? false,
DriveType = v.Driveline,
EPAClass = v.EPAClass,
Make = v.Make,
Model = v.Model
});
vehicle.AttachedWiring = context.IsAttachedWiring(vehicleID).Count() > 0 ? true : false;
return vehicle;
}
}
ERROR:
Unable to cast object of type 'System.Data.Objects.ObjectQuery`1[TowingService2._0.Model.Towing.TowingCustomerVehicle]' to type 'TowingService2._0.Model.Towing.TowingCustomerVehicle'. | 0 | [
2,
9252,
8,
8361,
3783,
16671,
6146,
10066,
872,
800,
3726,
3726,
48,
1797,
26561,
18,
47,
7920,
18,
21,
485,
8,
891,
7019,
9,
7398,
15,
31,
22,
79,
1659,
25836,
21,
8214,
13,
15617,
19,
9252,
8,
8361,
3783,
17,
6314,
20,
788,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Oracle TIMESTAMP error:datetime/interval precision is out of range
===
I created a table with TIMESTAMP(9) in Oracle 10g. Then i tried to insert CURRENT_TIMESTAMP value in that column but unfortunately got the error message: value too large for column: (actual: 35, maximum: 25)
Then i tried this query:
select length(current_timestamp) from dual;
and the count was 35.
But Oracle does not allow me to define TIMESTAMP(35) while creating the table structure.
In such a case, how to define the Timestamp column while creating the table and how to insert the Current Timestamp value in the Timestamp column? | 0 | [
2,
15759,
436,
38,
10158,
7019,
45,
8209,
891,
118,
6280,
3377,
13133,
25,
70,
16,
978,
800,
3726,
3726,
31,
679,
21,
859,
29,
436,
38,
10158,
5,
518,
6,
19,
15759,
332,
263,
9,
94,
31,
794,
20,
14692,
866,
1,
891,
384,
10158,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
loadrunner HMAC-SHA256
===
I need help to use the HMAC-SHA256 encoding(base64 encoded) in LoadRunner.
This is the corresponding method we are using in Perl :Digest::SHA qw(hmac_sha256_base64),
but I'm not able to make any progress in LoadRunner.
Can anyone please help? | 0 | [
2,
6305,
12993,
746,
6893,
8,
3162,
16910,
800,
3726,
3726,
31,
376,
448,
20,
275,
14,
746,
6893,
8,
3162,
16910,
19608,
5,
8436,
3470,
13665,
6,
19,
6305,
12993,
9,
48,
25,
14,
7265,
2109,
95,
50,
568,
19,
416,
255,
13,
45,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
what is Active Record model in Yii php framework?
===
I am reading a tutorial about Yii framework. It uses a term that I don't know its meaning. it is 'Active Record model' . It uses it database section tutorial.
Would you give me more explanation about this term ? | 0 | [
2,
98,
25,
1348,
571,
1061,
19,
7679,
49,
13,
26120,
6596,
60,
800,
3726,
3726,
31,
589,
1876,
21,
29724,
88,
7679,
49,
6596,
9,
32,
2027,
21,
981,
30,
31,
221,
22,
38,
143,
82,
1813,
9,
32,
25,
13,
22,
7889,
571,
1061,
22,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Using ifequal in Django
===
I'm sure there is something silly I'm missing here, but I'm trying to use ifequal to evaluate a template variable. Here's my model:
USER_TYPES = (
('instructor', 'Instructor'),
('student', 'Student'),
)
class UserProfile(models.Model):
type = models.CharField(choices=USER_TYPES, max_length=12)
user = models.ForeignKey(User, unique=True)
def __unicode__(self):
return u'%s' % (self.type)
...and I'm using this in the template:
{% ifequal user.userprofile_set.get student %}
Your a student!
{% endifequal %}
When I simply print out {{ user.userprofile_set.get }} I get:
student
Not sure what I'm missing - any help is appreciated! | 0 | [
2,
568,
100,
62,
14512,
19,
3857,
14541,
800,
3726,
3726,
31,
22,
79,
562,
80,
25,
301,
10752,
31,
22,
79,
2863,
235,
15,
47,
31,
22,
79,
749,
20,
275,
100,
62,
14512,
20,
13,
15599,
21,
22894,
7612,
9,
235,
22,
18,
51,
1061... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
how to handle curl session and cookies in php
===
I want to login via curl and maintain the cookies and session information for further calls.i have created cookie text file in the same directory and used the CURLOPT_COOKIEJAR ,CURLOPT_COOKIEFILE to maintain the cookie in CUL. whenever i had try to call login api it take the old cookie and show the previous user information. i need to maintain different user cookies and maintain session like normal browser handle. how to do that. any one give idea to do it. | 0 | [
2,
184,
20,
3053,
14320,
3723,
17,
19396,
19,
13,
26120,
800,
3726,
3726,
31,
259,
20,
6738,
108,
1197,
14320,
17,
4027,
14,
19396,
17,
3723,
676,
26,
653,
3029,
9,
49,
57,
679,
19980,
1854,
3893,
19,
14,
205,
16755,
17,
147,
14... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to Cancel AlarmManager on a Scheduled time
===
How can i cancel one AlarmManager on a scheduled time which is alreday started.I am starting one alarmmanager like this.I want to cancel it after 5 hours.How can i do this.?
AlarmManager service = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);
Intent i = new Intent(context, MyStartServiceReceiver.class);
PendingIntent pending = PendingIntent.getBroadcast(context, 0, i,
PendingIntent.FLAG_CANCEL_CURRENT);
Calendar cal = Calendar.getInstance();
cal.add(Calendar.SECOND, 30);
service.setInexactRepeating(AlarmManager.RTC_WAKEUP,
cal.getTimeInMillis(), REPEAT_TIME, pending); | 0 | [
2,
184,
20,
14815,
6490,
22256,
27,
21,
3758,
85,
800,
3726,
3726,
184,
92,
31,
14815,
53,
6490,
22256,
27,
21,
3758,
85,
56,
25,
493,
99,
1185,
373,
9,
49,
589,
1422,
53,
6490,
22256,
101,
48,
9,
49,
259,
20,
14815,
32,
75,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
how to trigger asp.net multiview?
===
I'm still getting my head around asp.net.
I followed some online examples of using multiviews and got them working just fine when I use something like a Menu class as the trigger to select the active view. Having the onClick event makes it pretty easy.
But I can't figure out how to change the emmited code from the Menu control.
I have the following multiview control...
<asp:MultiView ID="myView" runat="server" ActiveViewIndex="0">
<asp:View ID="0" runat="server">
<p>view page 1</p>
</asp:View>
<asp:View ID="1" runat="server">
<p>view page 2</p>
</asp:View>
</asp:MultiView>
And I need to have the following structure used to trigger the views.
(Note: this needs to be what gets emitted to the browser. Not necessarily the literal code in the aspx page)
<a class="button large-plain" href="" >
<span>
See page 1
</span>
</a>
<a class="button large-plain" href="" >
<span>
See page 2
</span>
</a>
Can I customise a Menu control so that it outputs this kind of structure? (And if so, how?)
I could just hard code the links that trigger the views (the structure is not going to change). But if I hardcode it, how do I call the onClick event what the links are clicked?
| 0 | [
2,
184,
20,
7286,
28,
306,
9,
2328,
1889,
4725,
60,
800,
3726,
3726,
31,
22,
79,
174,
1017,
51,
157,
140,
28,
306,
9,
2328,
9,
31,
709,
109,
2087,
3770,
16,
568,
1889,
4725,
18,
17,
330,
105,
638,
114,
1123,
76,
31,
275,
301... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
how to delete/remove a specific table row in mySQL using php?
===
I already have this code:
<?php
if ($quantity == 0){
$prd_name = " ";
$colors = " ";
$sizes = " ";
$quantity = " ";
$price = " ";
$TIP = " ";
$TPA = " ";
$cost = " ";
$amount = " ";
$query ="DELETE FROM orders WHERE quantity='0'";
}
?>
but it still makes a table row entry.
What i'm trying to do is when the inputed number of quantity is 0 then the table row will be deleted. please bear with me for I'm new in php and mySQL coding. | 0 | [
2,
184,
20,
27448,
118,
99,
16598,
21,
1903,
859,
3131,
19,
51,
18,
22402,
568,
13,
26120,
60,
800,
3726,
3726,
31,
614,
57,
48,
1797,
45,
13,
1,
60,
26120,
100,
13,
5,
4403,
18405,
38,
856,
800,
3726,
713,
6,
1,
5579,
4899,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Wordpress custom url from plugin
===
I want to be able to create url from plugin. for example. A new url would be http://example.com/slug-set-from-plugin which will output contents from plugin methods. Is it doable?
| 0 | [
2,
833,
5890,
5816,
287,
6362,
37,
10922,
108,
800,
3726,
3726,
31,
259,
20,
44,
777,
20,
1600,
287,
6362,
37,
10922,
108,
9,
26,
823,
9,
21,
78,
287,
6362,
83,
44,
7775,
6903,
29041,
9,
960,
118,
18,
2377,
263,
8,
3554,
8,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Do you can help me about speedup in cuda&&gpu?
===
I write a program in the cuda
But my problem is the speed, because my program is slow.
What do I do?
Thnx for your help. | 1 | [
2,
107,
42,
92,
448,
55,
88,
1362,
576,
19,
272,
5729,
1569,
1569,
263,
4201,
60,
800,
3726,
3726,
31,
2757,
21,
625,
19,
14,
272,
5729,
47,
51,
1448,
25,
14,
1362,
15,
185,
51,
625,
25,
2276,
9,
98,
107,
31,
107,
60,
13,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
IOS- iPad development, Unable to search records in SQLITE
===
I am using Xcode-5.1 to create a simple iPad app which can save and search records from SQLITE. My code executes fine(without any error or warning) but only save operation works fine, Not search .
Here's the code for save and search respectively.
1. CODE TO SAVE DATA IN DATABASE
- (IBAction)btnsave:(id)sender {
sqlite3_stmt *statement;
const char *dbpath = [databasePath UTF8String];
if ([textfirst.text length]==0 || [textlast.text length]==0|| [textuser.text length]==0 || [textemail.text length]==0||[textpass.text length]==0||[textconpass.text length]==0)
{
UIAlertView *alrt=[[UIAlertView alloc]initWithTitle:@"Error Message" message:@"Fill All Text First" delegate:self cancelButtonTitle:@"OK" otherButtonTitles: nil];
[alrt show];
}
else if(![textpass.text isEqualToString: textconpass.text])
{
UIAlertView *alrt=[[UIAlertView alloc]initWithTitle:@"Error Message" message:@"Password Not Matched" delegate:self cancelButtonTitle:@"OK" otherButtonTitles: nil];
[alrt show];
}
else if (sqlite3_open(dbpath, &contactDB) == SQLITE_OK)
{
NSString *insertSQL = [NSString stringWithFormat:
@"INSERT INTO CONTACTS (fname, lname, userid, email, pass, conpass) VALUES (\"%@\",\"%@\",\"%@\",\"%@\",\"%@\",\"%@\")",
textfirst.text, textlast.text, textuser.text, textemail.text,textpass.text,textconpass.text];
const char *insert_stmt = [insertSQL UTF8String];
sqlite3_prepare_v2(contactDB, insert_stmt,-1, &statement, NULL);
if (sqlite3_open(dbpath, &contactDB)==SQLITE_OK)
{
UIAlertView *alrt=[[UIAlertView alloc]initWithTitle:@"Message" message:@"Contact Added Succesfully" delegate:self cancelButtonTitle:@"OK" otherButtonTitles: nil];
[alrt show];
//status.text = @"Contact added";
textuser.text=@"";
textfirst.text = @"";
textlast.text=@"";
textemail.text=@"";
textpass.text = @"";
textconpass.text = @"";
}
else
{
UIAlertView *alrt=[[UIAlertView alloc]initWithTitle:@"Error Message" message:@"Failed to add contact" delegate:self cancelButtonTitle:@"OK" otherButtonTitles: nil];
[alrt show];
//status.text = @"Failed to add contact";
}
sqlite3_finalize(statement);
sqlite3_close(contactDB);
}
// Code to save data in database
2.CODE TO SEARCH DATA IN DATABASE
- (IBAction)btnfind:(id)sender {
const char *dbpath = [databasePath UTF8String];
sqlite3_stmt *statement;
if (sqlite3_open(dbpath, &contactDB) == SQLITE_OK)
{
NSString *querySQL = [NSString stringWithFormat:
@"SELECT LNAME, USERID FROM CONTACTS WHERE FNAME=\"%@\"", textfirst.text];
const char *query_stmt = [querySQL UTF8String];
//This line does not executes
if(sqlite3_prepare(contactDB, query_stmt, -1, &statement,NULL) == SQLITE_OK) //Does not executes
// The above line code does not executes
{
NSLog(@"Inside If");
if(sqlite3_step(statement) == SQLITE_ROW)
{
NSString *addressField = [[NSString alloc]
initWithUTF8String:
(const char *) sqlite3_column_text(
statement, 0)];
textlast.text = addressField;
NSString *phoneField = [[NSString alloc]
initWithUTF8String:(const char *)
sqlite3_column_text(statement, 1)];
textuser.text = phoneField;
NSLog(@"Match found");
}
else
{
NSLog(@"Match not found");
textlast.text = @"";
textuser.text = @"";
}
sqlite3_finalize(statement);
}
sqlite3_close(contactDB);
}
}
I am not able to figure out the exact reason for this behavior.
Kindly help me correct this code.
Thanks in advance. | 0 | [
2,
13,
7760,
8,
31,
8240,
522,
15,
2343,
20,
2122,
742,
19,
4444,
10601,
800,
3726,
3726,
31,
589,
568,
993,
9375,
8,
264,
9,
165,
20,
1600,
21,
1935,
31,
8240,
4865,
56,
92,
2079,
17,
2122,
742,
37,
4444,
10601,
9,
51,
1797,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to Delete *.aspx files from IIS server using asp.net and C#
===
Hi please help me as i am trying to delete some unnecessary aspx and aspx.cs files from IIS server with code below
File.Delete(Server.MapPath("~/Index.aspx"));
but it is not working.
please help me. | 1 | [
2,
184,
20,
27448,
1637,
9,
472,
306,
396,
6488,
37,
595,
18,
8128,
568,
28,
306,
9,
2328,
17,
272,
5910,
800,
3726,
3726,
4148,
2247,
448,
55,
28,
31,
589,
749,
20,
27448,
109,
16435,
28,
306,
396,
17,
28,
306,
396,
9,
6824,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How were these slide shows created?
===
I really like these two slide presentations
- http://www.nixon.com/mens/
- http://www.williams-sonoma.com/shop/agrarian-garden/?cm_type=gnav
How are these done? | 2 | [
2,
184,
46,
158,
6464,
1285,
679,
60,
800,
3726,
3726,
31,
510,
101,
158,
81,
6464,
6364,
18,
13,
8,
7775,
6903,
6483,
9,
14064,
218,
9,
960,
118,
755,
18,
118,
13,
8,
7775,
6903,
6483,
9,
15034,
18,
8,
528,
4955,
9,
960,
11... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Navigating from Storyboard that has no NIB
===
Using storyboard, I created a tab-bar app with 5 tabs in it. So the initial view - the tab-bar view - has no NIB, as its simply created with storyboard.<br/>
Everything works perfectly well - but what if I wanted to programmatically load other view-controllers on top of this tab-bar view?<br/>
If it had its own Nib/View, I could do
[self presentModalViewController:openingVC animated:YES];
or
`[self.view addSubview:specialVC.view];`
But being that there is no "self" to begin with, I can't load another view onto "self." <br/>
<br/>
I tried using storyboard code with
`instantiateViewControllerWithIdentifier`
but that's not working.<br/><br/>
Am I going to have to create a tab-bar View Controller (with a ".h", ".m", and ".xib" files) and make the storyboard's initial screen be of that class?<br/>
Almost seems to defeat the purpose of storyboarding...
<br/><br/>
any suggestions? | 0 | [
2,
1775,
13227,
1880,
37,
609,
2806,
30,
63,
90,
1781,
220,
800,
3726,
3726,
568,
609,
2806,
15,
31,
679,
21,
6523,
8,
1850,
4865,
29,
331,
6523,
18,
19,
32,
9,
86,
14,
2104,
1418,
13,
8,
14,
6523,
8,
1850,
1418,
13,
8,
63,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Are there local key-value store DBs (unlike redis) that can run on iOS?
===
So I have an app which needs to read a lot of small data (e.g an app that processes lots of customer records).
Normally, for server systems that do this kind of stuff, you can use a database which handles a) caching most recently used data b) indexing them, and c) storing them for efficient retrieval from the file system.
Right now, for my app, I just have a std::map<> that maps data id into the data themselves which are pretty small (like 120 bytes each, or something close to that). The data id themselves are just mapped into the file system directly.
However, this kind of system does not handle unloading of data (if the memory starts to run out) or efficient storage of the data (granted, iOS uses flash storage, and so the OS should handle the caching), but yeah.
Are there libraries or something like that that can handle this kind of stuff? Or would I have to build my own caching system from scratch? Not too bothered with indexing, only a) caching/unloading and c) storing for efficient retrieval. I'm feeling wary on storing thousands (or potentially hundreds of thousands) of files onto the file system. | 0 | [
2,
50,
80,
375,
1246,
8,
15165,
1718,
13,
9007,
18,
13,
5,
1020,
1403,
402,
403,
6,
30,
92,
485,
27,
13,
7760,
60,
800,
3726,
3726,
86,
31,
57,
40,
4865,
56,
2274,
20,
1302,
21,
865,
16,
284,
1054,
13,
5,
62,
9,
263,
40,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Are class declarations that are initially set, internally the same as setting them in the constructor?
===
Are class declarations that are initially set, internally the same as setting them in the constructor?
example:
class test
{
int test1 = 5;
}
Is there any difference between that and
class test
{
int test1;
public test()
{
test1 = 5;
}
}
If there is no difference, which is more correct to do?
| 0 | [
2,
50,
718,
7098,
18,
30,
50,
1537,
309,
15,
17739,
14,
205,
28,
2697,
105,
19,
14,
6960,
248,
60,
800,
3726,
3726,
50,
718,
7098,
18,
30,
50,
1537,
309,
15,
17739,
14,
205,
28,
2697,
105,
19,
14,
6960,
248,
60,
823,
45,
718... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Best way to create a multicountries news site?
===
I have to create a website like nytimes.com but multicountries ( different news and languages for different countries ).
So, what is the best way to create a multicountries website like that ?
- I could buy a domain for every country: example.com, example.es, example.fr, example.it, etc
- I could add a subdomain for every country ( example.com, es.example.com, fr.example.com, it.example.com ) and then I could use the IP address to locate the user.
- other solutions...
The website must be optimized for search engines and possibly avoid buying multiple domains if not necessary. | 4 | [
2,
246,
161,
20,
1600,
21,
1889,
16549,
2829,
996,
689,
60,
800,
3726,
3726,
31,
57,
20,
1600,
21,
2271,
101,
3071,
891,
18,
9,
960,
47,
1889,
16549,
2829,
13,
5,
421,
996,
17,
2556,
26,
421,
1166,
13,
6,
9,
86,
15,
98,
25,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Updating links on a force directed graph from dynamic json data
===
I am pretty much new to D3 and this is just my question on D3!! I am working on a force directed graph where the json data is dynamic. I am able to change the force graph on recieving of new data but that happens with a springing effect. The code that creates my force graph is :
<div class="graph"></div>
<script>
var w = 660,
h = 700,
r = 10;
var vis = d3.select(".graph")
.append("svg:svg")
.attr("width", w)
.attr("height", h)
.attr("pointer-events", "all")
.append('svg:g')
.call(d3.behavior.zoom().on("zoom", redraw))
.append('svg:g');
vis.append('svg:rect')
.attr('width', w)
.attr('height', h)
.attr('fill', 'rgba(1,1,1,0)');
function redraw() {
console.log("here", d3.event.translate, d3.event.scale);
vis.attr("transform","translate(" + d3.event.translate + ")" + " scale(" + d3.event.scale + ")"); }
var force = d3.layout.force()
.gravity(.05)
.charge(-200)
.linkDistance( 260 )
.size([w, h]);
var svg = d3.select(".text").append("svg")
.attr("width", w)
.attr("height", h);
d3.json(graph, function(json) {
var nodeList = json.nodes;
var link = vis.selectAll("line")
.data(json.links)
.enter().append("line")
.attr("stroke-opacity", function(d) { if(d.label == 'is a') { return '0.8';} else{ return '0.2'; }; })
.attr("stroke-width",function(d) { if(d.value !== null) { return d.value;} else {return 2;}; })
.style("stroke", function(d) { if(d.color !== null) { return d.color;}; })
.on("mouseover", function(){d3.select(this).style("stroke", "#999999").attr("stroke-opacity", "1.0");})
.on("mouseout", function(){d3.select(this).style("stroke", function(d) { if(d.color !== null) { return d.color;}; }).attr("stroke-opacity", function(d) { if(d.label == 'is a') { return '0.8';} else { return '0.2'; };}) });
link.append("title")
.text(function(d) { return d.label } );
var node = vis.selectAll("g.node")
.data(json.nodes)
.enter().append("svg:g")
.attr("class","node")
.call(force.drag);
node.append("svg:circle")
.attr("r", function(d) {
if (d.size > 0)
{ return 10+(d.size*2); }
else
{ return 10; }} )
.attr("id",function(d) { return "Node;"+d.id;})
.style("fill", function(d) { if(d.style == 'filled') { return d.color;}; })
.style("stroke", function(d) { if(d.style !== 'filled') { return d.color;}; })
.style("stroke-width", "2")
.on("mouseover", function(){d3.select(this).style("fill", "#999"); fade(.1);})
.on("mouseout", function(d) {
if (d.style == 'filled') { d3.select(this).style("fill",d.color);fade(1); }
else {
d3.select(this).style("stroke",d.color);
d3.select(this).style("fill","black");
} fade(1);} );
node.append("title")
.text(function(d) { return d.Location; } );
force
.nodes(json.nodes)
.links(json.links)
.on("tick", tick)
.alpha(1)
.start();
function tick() {
node.attr("cx", function(d) { return d.x; })
.attr("cy", function(d) { return d.y; })
.attr("transform", function(d) { return "translate(" + d.x + "," + d.y + ")";});
link.attr("x1", function(d) { return d.source.x; })
.attr("y1", function(d) { return d.source.y; })
.attr("x2", function(d) { return d.target.x; })
.attr("y2", function(d) { return d.target.y; });
}
});
</script>
I am able to get new graph created when new json string is received by recalling the whole function again. This is creating a new graph in place of the old. I am unable to update the old graph with new set of value recieved as the nodes in my graph do not change, just the relation among them is changing.
I did stumble upon an example (http://bl.ocks.org/1095795) where a new node is deleted and recreated, but the implementation is a bit different.
Hope this helps me find a solution!
Any pointers or help will be really appreciated.
| 0 | [
2,
71,
43,
1880,
6271,
27,
21,
558,
1012,
7210,
37,
7782,
487,
528,
1054,
800,
3726,
3726,
31,
589,
1772,
212,
78,
20,
13,
43,
240,
17,
48,
25,
114,
51,
1301,
27,
13,
43,
240,
19015,
31,
589,
638,
27,
21,
558,
1012,
7210,
11... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
bit vector implementation of set in Programming Pearls, 2nd Edition
===
On Page 140 of Programming Pearls, 2nd Edition, Jon proposed an implementation of sets with bit vectors.
---
We'll turn now to two final structures that exploit the fact that our sets represent integers. Bit vectors are an old friend from Column 1. Here are their private data and functions:
enum { BITSPERWORD = 32, SHIFT = 5, MASK = 0x1F };
int n, hi, *x;
void set(int i) { x[i>>SHIFT] |= (1<<(i & MASK)); }
void clr(int i) { x[i>>SHIFT] &= ~(1<<(i & MASK)); }
int test(int i) { return x[i>>SHIFT] &= (1<<(i & MASK)); }
As I gathered, the central idea of a bit vector to represent an integer set, as described in Column 1, is that the i-th bit is turned on if and only if the integer i is in the set.
But I am really at a loss at the algorithms involved in the above three functions. And the book doesn't give an explanation.
I can only get that `i & MASK` is to get the lower 5 bits of i, while `i>>SHIFT` is to move i 5 bits toward the right.
Anybody would elaborate more on these algorithms? Bit operations always seem a myth to me, :( | 0 | [
2,
1142,
7497,
6123,
16,
309,
19,
3143,
5445,
18,
15,
172,
706,
1322,
800,
3726,
3726,
27,
2478,
10008,
16,
3143,
5445,
18,
15,
172,
706,
1322,
15,
3938,
2097,
40,
6123,
16,
3415,
29,
1142,
7497,
18,
9,
13,
8,
8,
8,
95,
22,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Resize uploaded image to max width, max height?
===
i have a php image upload upload form and what i want to do is before the image is saved on my server, it needs to be resized to make sure the height doesnt exceed the max height ive set, and the width doesnt exceed the max width i set. I was thinking the way to do it would first be a) check if the width is greater than max width. If so, PROPORTIONALLY resize image so the width equals the max width. Then, check the height. If the height exceeds max height, proportionally resize the image so the height equals the max height.
Any suggestions? Ive read that libraries such as gd and imagic would do the trick, however i can not use those. I need a more lightweight script.
Assume that the image is `echo $_FILES["file"]["name"];` | 0 | [
2,
302,
10454,
23782,
1961,
20,
2049,
9456,
15,
2049,
2947,
60,
800,
3726,
3726,
31,
57,
21,
13,
26120,
1961,
71,
8294,
71,
8294,
505,
17,
98,
31,
259,
20,
107,
25,
115,
14,
1961,
25,
4377,
27,
51,
8128,
15,
32,
2274,
20,
44,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Using ffmpeg to get video info - why do I need to specify an output file?
===
I'm using ffmpeg to get info about a video file and I don't want to save the info into a file. ffmpeg is returning all the video info, but it's returning as an error because I'm not specifying an output file. The command I'm using is:
ffmpeg -i C:\Test\3FA8D0E6-BD61-D160-98BB41304D63FAE3.mp4
The error I get is "At least one output file must be specified"
I'm calling this in ColdFusion using <cfexecute>, and the output is being stored in a local variable, which is why I don't want to specify a file... I just don't need to store this in a file.
If it makes any difference, I'm running this on Windows. | 0 | [
2,
568,
13,
2460,
79,
20427,
20,
164,
763,
15404,
13,
8,
483,
107,
31,
376,
20,
19077,
40,
5196,
3893,
60,
800,
3726,
3726,
31,
22,
79,
568,
13,
2460,
79,
20427,
20,
164,
15404,
88,
21,
763,
3893,
17,
31,
221,
22,
38,
259,
2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Changing javascript snippet background and text colors
===
Can I change the color of this snippet I got from 100 widget? I would like (love) the image color to be 2a5500 (green) and the text to be white.
<script type="text/javascript" src="http://100widgets.com/js_data.php?id=104"></script> | 0 | [
2,
4226,
8247,
8741,
13,
29061,
2395,
17,
1854,
5268,
800,
3726,
3726,
92,
31,
753,
14,
1665,
16,
48,
13,
29061,
31,
330,
37,
808,
4807,
43,
3060,
60,
31,
83,
101,
13,
5,
4583,
6,
14,
1961,
1665,
20,
44,
172,
58,
264,
6000,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
In Magento Order Emails (and all emails), how do I change the they way the SKU codes are displayed?
===
Currently in Magento, all new order emails, invoices, etc. show a list of times purchased. In one column, they have the product with all the options below it, and in the next column the SKU's... however the SKU's are just printed in a line
SKU
041727-03C-SFIT - 10-COL - 10-CUF
what I would like to have it do is show the sku's on a new line (or if possible in line with the each of the product options as this makes more sense), so it would look something like
**ITEM** **SKU**
Shirt 041727-03C
Fit SFIT
Collar 10-COL
Cuffs 10-CUF
Where would I go to make that change?
I found that in /app/design/frontend/default/default/template/email/order/items/order/default.phtml
there is a line that says
<?php echo $this->htmlEscape($this->getSku($_item)) ?>
But I can't figure out where the HTML for getSku is being generated | 0 | [
2,
19,
4723,
17050,
389,
8517,
18,
13,
5,
290,
65,
8517,
18,
6,
15,
184,
107,
31,
753,
14,
59,
161,
14,
13,
18,
2294,
11358,
50,
6115,
60,
800,
3726,
3726,
871,
19,
4723,
17050,
15,
65,
78,
389,
8517,
18,
15,
19,
13379,
18,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
NSURLConnection for multiple images
===
I have to develop a code for following code :
1) set up an apache server on ur mac.
2) host about 200+ photos there. (each should be about 1 mb to 2 mb)
3) Right a Tab bar app with 4 tabs.
4) Tab 1 : Implement a UITableView that should display all ur hosted photos. Load the photos synchronously
5) Tab 2 : Implement a UITableView that should display all ur hosted photos. Load the photos asynchronously.
I have set up apache server from System Preferences under Sharing and created a tab bar now how to implement step 4,5 ..help
| 0 | [
2,
13,
103,
4082,
255,
25996,
872,
26,
1886,
3502,
800,
3726,
3726,
31,
57,
20,
2803,
21,
1797,
26,
249,
1797,
13,
45,
137,
6,
309,
71,
40,
17140,
8128,
27,
13,
911,
1572,
9,
172,
6,
2015,
88,
2327,
2430,
7064,
80,
9,
13,
5,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
From Matlab to the web
===
I have big project in Matlab with some pretty complicated GUI. I'd like to put it on my apache server. The idea is: people should've access to it without downloading anything (I mean something like Java applet or web app). I've managed to create a .jar file by using the deploytool but I'm not sure it's the right way. I've read mathworks tutorial, but in the example: http://www.mathworks.com/help/toolbox/javabuilder/ug/bsqrikz-26.html they're using some piece of JavaCode which I don't really know where they got it from. In the end I've created a .war file but the apache sees it only as an archive, not as an application, so clearly I did something wrong.
So, could someone tell what I have to do step-by-step to create a web application from my Matlab code, please?
Thx! | 0 | [
2,
37,
4277,
9086,
20,
14,
2741,
800,
3726,
3726,
31,
57,
580,
669,
19,
4277,
9086,
29,
109,
1772,
8343,
9457,
9,
31,
22,
43,
101,
20,
442,
32,
27,
51,
17140,
8128,
9,
14,
882,
25,
45,
148,
378,
22,
195,
1381,
20,
32,
366,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to initialize N dimensional arrays in C without using loop
===
I want to initalize a 3 x 3 matrix with first two rows as 0's and last row as 1's. I have declared a 2D array `int matrix[3][3]`
I want to initialize it without using loops as shown below
>0 0 0<br>
>0 0 0<br>
>1 1 1
I would also like a solution for N dimiensional array | 0 | [
2,
184,
20,
2104,
2952,
13,
103,
13,
7865,
7718,
18,
19,
272,
366,
568,
5293,
800,
3726,
3726,
31,
259,
20,
19,
242,
192,
2952,
21,
203,
993,
203,
8187,
29,
64,
81,
11295,
28,
713,
22,
18,
17,
236,
3131,
28,
137,
22,
18,
9,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Git GUI crashes every time it opens a repository
===
Since few days ago, every time I start Git GUI in a repository, it displays this horrifying error message and quits after I click OK:
prepare-commit-msg hook failed:
0 [main] us 0 init_cheap: VirtualAlloc pointer is null, Win32 error 487
AllocationBase 0x0, BaseAddress 0x68560000, RegionSize 0x260000, State 0x10000
C:\Program Files (x86)\Git\bin\sh.exe: *** Couldn't reserve space for cygwin's heap, Win32 error 0
You must correct the above errors before committing.
It only happens with Git GUI and only when in repository (old or newly created one). Common commands in Git Bash including commit work fine.
Un-installing and re-installing with newer package (only minor version change) did not remove the issue. It still happens with old repositories as well as with newly created ones.
On a clean machine this issue does not reproduce, so I guess it's something on my box, but I don't remember installing anything funny. I do remember turning off my box after a long time though, so maybe some Windows Update could have triggered this--that would also explain why the other machine does not suffer--it's 2-3 months since last Win update there.
Any ideas how to shed light into this? (As I can only see it on single machine, I don't feel like submitting it to official tracker before I know it's not my/other app's fault...) | 0 | [
2,
13,
10404,
9457,
21563,
352,
85,
32,
8965,
21,
24869,
800,
3726,
3726,
179,
310,
509,
1464,
15,
352,
85,
31,
799,
13,
10404,
9457,
19,
21,
24869,
15,
32,
9412,
48,
4523,
139,
10874,
7019,
2802,
17,
6489,
18,
75,
31,
10840,
58... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
storing data types other than string in XML Nodes using libxml2
===
Seemingly, libxml2 has only 4 datatypes namely xmlChar, xmlDoc, xmlNodePtr and xml-
Node. I want to keep integer and double in the nodes of XML, Do I have to cast them to string each time or Is there any other way to do it without any casting?
| 0 | [
2,
25615,
1054,
2551,
89,
119,
3724,
19,
23504,
16272,
568,
13,
8326,
396,
8184,
135,
800,
3726,
3726,
9688,
15,
13,
8326,
396,
8184,
135,
63,
104,
268,
1054,
4474,
18,
8525,
23504,
5433,
15,
23504,
13799,
15,
23504,
251,
17309,
638... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Getting value of the selected submenu item
===
I have developed a menu, submenu using MFC in C++. The submenu is dynamic and keeps changing.
Upon selection of the dynamic submenu, how do I get its value?
I am really stuck here. I would be thankful! | 0 | [
2,
1017,
1923,
16,
14,
1704,
972,
755,
291,
9101,
800,
3726,
3726,
31,
57,
885,
21,
11379,
15,
972,
755,
291,
568,
307,
7061,
19,
272,
20512,
9,
14,
972,
755,
291,
25,
7782,
17,
8968,
4226,
9,
685,
3155,
16,
14,
7782,
972,
755... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Get value from hidden field of ASP.Net in Javascript
===
How to get value from a hidden field from javascript.
I m using the below code to do this but getting error:-
var digiclock = document.getElementById("<%= HiddenFieldMinutes.ClientID %>").value;
I m getting this error message : Unable to get value of the property 'value': object is null or undefined
Please guide me that how i get value from this hidden field in JavaScript. | 0 | [
2,
164,
1923,
37,
3689,
575,
16,
28,
306,
9,
2328,
19,
8247,
8741,
800,
3726,
3726,
184,
20,
164,
1923,
37,
21,
3689,
575,
37,
8247,
8741,
9,
31,
307,
568,
14,
1021,
1797,
20,
107,
48,
47,
1017,
7019,
45,
8,
4033,
6131,
49,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Infinite loop - Setup events for PageRequestManager inside iframe
===
I am trying to setup events for AJAX requests made by the PageRequestManager inside an iframe.
var iframe = $("#IframeProjectpage");
if (iframe != null && iframe.length != 0) {
iframe.load(function () {
var reqManInst = iframe[0].contentWindow.Sys.WebForms.PageRequestManager.getInstance();
if (!reqManInst.get_isInAsyncPostBack()) {
reqManInst.add_endRequest(AjaxEnd);
reqManInst.add_initializeRequest(AjaxBegin);
}
}
}
function AjaxEnd(sender, args) {
alert("AJAX END...");
}
function AjaxBegin(sender, args) {
alert("AJAX START...");
}
I have verified that reqManInst does hold a reference to the ScriptManager.
The problem is, that when making the call `reqManInst.add_endRequest(AjaxEnd);`, it ends up in an infinite loop. Firefox becomes unresponsive, and Internet Explorer gives "out of stack" error.
Moving the add_endRequest code inside the document in the iframe itself solves the issue, but I want to access it from outside the iframe.
Isn't that possible. Any suggestions? | 0 | [
2,
9698,
5293,
13,
8,
18161,
963,
26,
2478,
99,
10351,
22256,
572,
31,
8361,
800,
3726,
3726,
31,
589,
749,
20,
18161,
963,
26,
20624,
12279,
117,
34,
14,
2478,
99,
10351,
22256,
572,
40,
31,
8361,
9,
4033,
31,
8361,
800,
5579,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to add new value to listpreference and save it?
===
I have a list Preference that created from resource xml. I added preference that created dialog in which user can add value to listPreference.
using those methods i added new value:
entries = getEntries();
entryValues = getEntryValues();
when user is adding values to listpreference, its displayed. But when preferenceScreen is recreating new value disappearing.
How can i save those new values?
| 0 | [
2,
184,
20,
3547,
78,
1923,
20,
968,
306,
28018,
17,
2079,
32,
60,
800,
3726,
3726,
31,
57,
21,
968,
9808,
30,
679,
37,
6577,
23504,
9,
31,
905,
9808,
30,
679,
28223,
19,
56,
4155,
92,
3547,
1923,
20,
968,
306,
28018,
9,
568,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Spring Security doesn't "remember" login accross subdomains
===
Setup:
we have a webapp that uses Spring Security. The mobile part has a different subdomain (e.g. m.example.com).
We got the following situation:
- User logs in on example.com.
- User gets redirected to m.example.com and is not logged in anymore, but should be.
If all cookies are deleted the other way around works.
We assume that spring uses different cookies for the login on the subdomain. Given that: Is there any way to tell spring to use the same cookie in all subdomains?
Thanks in advance and best regards
Jan | 0 | [
2,
1573,
1221,
1437,
22,
38,
13,
7,
18342,
7,
6738,
108,
21,
150,
7703,
972,
537,
6232,
18,
800,
3726,
3726,
18161,
45,
95,
57,
21,
2741,
7753,
30,
2027,
1573,
1221,
9,
14,
3241,
141,
63,
21,
421,
972,
537,
6232,
13,
5,
62,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Optional Element type DTD
===
i have an XML doc like this:
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE school SYSTEM "">
<school>
<data>
<id>
<uid>1</uid>
</id>
<information>
<name>Michael</name>
<surename>Julius</surename>
</information>
<note>
<test>hans</test>
</note>
</data>
</school>
and a DTD File
<!ELEMENT school (data)>
<!ELEMENT data (id,information,note)>
<!ELEMENT id (uid)>
<!ELEMENT uid (#PCDATA)>
<!ELEMENT information (name,surename?)>
<!ELEMENT name (#PCDATA)>
<!ELEMENT surename (#PCDATA)>
<!ELEMENT note (#PCDATA)> <--- unknown element type
I want to define the `<note>` element with optional element types like
<note>
<test2>test2</test2>
</note>
or
<note>
<unknown name></unknown name>
</note>
any help?
thankz
| 0 | [
2,
12832,
4520,
1001,
13,
43,
38,
43,
800,
3726,
3726,
31,
57,
40,
23504,
9765,
101,
48,
45,
13,
1,
60,
396,
8184,
615,
3726,
7,
165,
9,
387,
7,
19608,
3726,
7,
1982,
410,
8,
457,
7,
13,
60,
1,
13,
1,
187,
13799,
4474,
116... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to test your own project in Asp.net in C#?
===
Once I finish developing my project, my manager tells me to test. I test it and finds no problem. But when my boss tests it, she finds one or the other bug or finds some modifications to be made. I really get frustrated. She keeps on telling me test until I find no modifications to be done. I don't know what to test after developing according to the requirement. Could you help me?
Thanks in Advance. | 3 | [
2,
184,
20,
1289,
154,
258,
669,
19,
28,
306,
9,
2328,
19,
272,
5910,
60,
800,
3726,
3726,
382,
31,
2106,
3561,
51,
669,
15,
51,
1382,
2609,
55,
20,
1289,
9,
31,
1289,
32,
17,
3797,
90,
1448,
9,
47,
76,
51,
4054,
4894,
32,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to disable git aware zsh theme on folders that dont have a .git/
===
I'm really happy with the git plugin that comes with oh-my-zsh, but i haven't figure out how to add a function to check for a initialized git repo (i.e. check for .git folder) and don't display the branch name or status if it returns false. This is a great plug in but it does slow down the shell and I'd like to have it off on the other 90% of the folders...
# get the name of the branch we are on
function git_prompt_info() {
ref=$(git symbolic-ref HEAD 2> /dev/null) || return
echo "$ZSH_THEME_GIT_PROMPT_PREFIX${ref#refs/heads/}$(parse_git_dirty)$ZSH_THEME_GIT_PROMPT_SUFFIX"
}
# Checks if working tree is dirty
parse_git_dirty() {
local SUBMODULE_SYNTAX=''
if [[ $POST_1_7_2_GIT -gt 0 ]]; then
SUBMODULE_SYNTAX="--ignore-submodules=dirty"
fi
if [[ -n $(git status -s ${SUBMODULE_SYNTAX} 2> /dev/null) ]]; then
echo "$ZSH_THEME_GIT_PROMPT_DIRTY"
else
echo "$ZSH_THEME_GIT_PROMPT_CLEAN"
fi
}
# Checks if there are commits ahead from remote
function git_prompt_ahead() {
if $(echo "$(git log origin/$(current_branch)..HEAD 2> /dev/null)" | grep '^commit' &> /dev/null); then
echo "$ZSH_THEME_GIT_PROMPT_AHEAD"
fi
}
# Formats prompt string for current git commit short SHA
function git_prompt_short_sha() {
SHA=$(git rev-parse --short HEAD 2> /dev/null) && echo "$ZSH_THEME_GIT_PROMPT_SHA_BEFORE$SHA$ZSH_THEME_GIT_PROMPT_SHA_AFTER"
}
# Formats prompt string for current git commit long SHA
function git_prompt_long_sha() {
SHA=$(git rev-parse HEAD 2> /dev/null) && echo "$ZSH_THEME_GIT_PROMPT_SHA_BEFORE$SHA$ZSH_THEME_GIT_PROMPT_SHA_AFTER"
}
# Get the status of the working tree
git_prompt_status() {
INDEX=$(git status --porcelain 2> /dev/null)
STATUS=""
if $(echo "$INDEX" | grep '^?? ' &> /dev/null); then
STATUS="$ZSH_THEME_GIT_PROMPT_UNTRACKED$STATUS"
fi
if $(echo "$INDEX" | grep '^A ' &> /dev/null); then
STATUS="$ZSH_THEME_GIT_PROMPT_ADDED$STATUS"
elif $(echo "$INDEX" | grep '^M ' &> /dev/null); then
STATUS="$ZSH_THEME_GIT_PROMPT_ADDED$STATUS"
fi
if $(echo "$INDEX" | grep '^ M ' &> /dev/null); then
STATUS="$ZSH_THEME_GIT_PROMPT_MODIFIED$STATUS"
elif $(echo "$INDEX" | grep '^AM ' &> /dev/null); then
STATUS="$ZSH_THEME_GIT_PROMPT_MODIFIED$STATUS"
elif $(echo "$INDEX" | grep '^ T ' &> /dev/null); then
STATUS="$ZSH_THEME_GIT_PROMPT_MODIFIED$STATUS"
fi
if $(echo "$INDEX" | grep '^R ' &> /dev/null); then
STATUS="$ZSH_THEME_GIT_PROMPT_RENAMED$STATUS"
fi
if $(echo "$INDEX" | grep '^ D ' &> /dev/null); then
STATUS="$ZSH_THEME_GIT_PROMPT_DELETED$STATUS"
elif $(echo "$INDEX" | grep '^AD ' &> /dev/null); then
STATUS="$ZSH_THEME_GIT_PROMPT_DELETED$STATUS"
fi
if $(echo "$INDEX" | grep '^UU ' &> /dev/null); then
STATUS="$ZSH_THEME_GIT_PROMPT_UNMERGED$STATUS"
fi
echo $STATUS
}
#compare the provided version of git to the version installed and on path
#prints 1 if input version <= installed version
#prints -1 otherwise
function git_compare_version() {
local INPUT_GIT_VERSION=$1;
local INSTALLED_GIT_VERSION
INPUT_GIT_VERSION=(${(s/./)INPUT_GIT_VERSION});
INSTALLED_GIT_VERSION=($(git --version));
INSTALLED_GIT_VERSION=(${(s/./)INSTALLED_GIT_VERSION[3]});
for i in {1..3}; do
if [[ $INSTALLED_GIT_VERSION[$i] -lt $INPUT_GIT_VERSION[$i] ]]; then
echo -1
return 0
fi
done
echo 1
}
#this is unlikely to change so make it all statically assigned
POST_1_7_2_GIT=$(git_compare_version "1.7.2")
#clean up the namespace slightly by removing the checker function
unset -f git_compare_version
| 0 | [
2,
184,
20,
1460,
579,
13,
10404,
3854,
2052,
1635,
3184,
27,
19294,
18,
30,
1049,
57,
21,
13,
9,
10404,
118,
800,
3726,
3726,
31,
22,
79,
510,
1700,
29,
14,
13,
10404,
10922,
108,
30,
1624,
29,
1962,
8,
915,
8,
380,
1635,
15,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Xvfb top-left adjustment
===
I have an X11 virtual frame buffer that I would like to run just one particular program in so that I can connect and disconnect from either my desktop or tablet without closing the program (and also without running a full desktop manager). Everything works great except the window top left of the window is off by a few hundred pixels each, is it possible to adjust this on an xvfb?
Screenshot: ![enter image description here][1]
[1]: http://i.stack.imgur.com/smZmW.png | 0 | [
2,
17301,
13478,
371,
8,
9742,
16040,
800,
3726,
3726,
31,
57,
40,
993,
1306,
6599,
3523,
17497,
30,
31,
83,
101,
20,
485,
114,
53,
1498,
625,
19,
86,
30,
31,
92,
6379,
17,
29363,
37,
694,
51,
17404,
54,
16394,
366,
4239,
14,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Using MSChart, add a datapoint to a stacked column
===
I have a stacked column ms chart in which all charts have 3 series / values. If a certain condition exists, I would like to add an additional series to the chart. In the image below, the additional series on the chart appears at the first and second indexed column. I would like the additional stacked column to appear on the 2nd and 9th position.
![enter image description here][1]
[1]: http://i.stack.imgur.com/wdvpf.jpg
protected void Page_Load(object sender, System.EventArgs e)
{
// Populate series data
Random random = new Random();
for(int pointIndex = 0; pointIndex < 10; pointIndex++)
{
Chart1.Series[0].Points.AddY(10);
Chart1.Series[1].Points.AddY(50);
Chart1.Series[2].Points.AddY(30);
if (pointIndex == 1 || pointIndex == 8)
{
//both commented out code blocks break chart
//Chart1.Series[3].Points.AddXY(40,pointIndex);
//Chart1.Series[3].Points.AddXY(pointIndex,40);
Chart1.Series[3].Points.AddXY(0,40);//.AddXY(0,40);
}
}
}
| 0 | [
2,
568,
4235,
5433,
38,
15,
3547,
21,
1054,
3132,
20,
21,
20054,
4698,
800,
3726,
3726,
31,
57,
21,
20054,
4698,
4235,
1795,
19,
56,
65,
5158,
57,
203,
231,
13,
118,
4070,
9,
100,
21,
1200,
2874,
5636,
15,
31,
83,
101,
20,
354... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
SQL Server Proc - prevent from running if not on staging server
===
I wrote a stored procedure to transfer data from one SQL server to another. Is it possible to have logic at the beginning of the stored procedure to only execute on a certain server?
For example:
If IP!="100.xxx.xxx.xxx" then
RaiseError 'You cannot run this procedure from this server
end if
I know one solution is not deploy the proc to the other server. Just curious, thanks.
G- | 0 | [
2,
4444,
255,
8128,
13,
15617,
13,
8,
2501,
37,
946,
100,
52,
27,
16824,
8128,
800,
3726,
3726,
31,
738,
21,
8214,
7004,
20,
2617,
1054,
37,
53,
4444,
255,
8128,
20,
226,
9,
25,
32,
938,
20,
57,
7085,
35,
14,
997,
16,
14,
82... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
replace plain-text with html using jQuery
===
I'm trying to write a replacewith function in jQuery that will replace specific words with html.
Basically I'm trying to replace something like `[this]` with `<span class='myclass'>` as the document is loaded. I've looked around for a couple samples but the couple things I saw I was unable to get to work. I'm still learning jQuery so I'm hoping someone could give me a couple suggestions as what to try.
Thanks in advance, Steven.
http://jsfiddle.net/juTtG/
| 0 | [
2,
3934,
3748,
8,
11969,
29,
13,
15895,
568,
487,
8190,
93,
800,
3726,
3726,
31,
22,
79,
749,
20,
2757,
21,
3934,
1410,
1990,
19,
487,
8190,
93,
30,
129,
3934,
1903,
715,
29,
13,
15895,
9,
11374,
31,
22,
79,
749,
20,
3934,
301... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
In JavaScript what is the right way to kill a DOM element?
===
I know that I can set it's style to "display: none"
However, that just hides it.
I really want to kill a DOM element and all of it's children.
The context is that I'm building a desktop-like GUI system (for learning purposes) inside of a DOM, and when a "window" is closed, I want that DIV and all it's children to be removed.
Thus, in JavaScript, how to I tell the GC "hey, get rid of this DOM element, it's no longer needed"?
Thanks! | 0 | [
2,
19,
8247,
8741,
98,
25,
14,
193,
161,
20,
1177,
21,
11859,
4520,
60,
800,
3726,
3726,
31,
143,
30,
31,
92,
309,
32,
22,
18,
1034,
20,
13,
7,
2906,
5438,
45,
2369,
7,
207,
15,
30,
114,
3077,
18,
32,
9,
31,
510,
259,
20,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Get a net.UDPConn's syscall.Handle on Windows?
===
How do I obtain the underlying `syscall.Handle` for a `*net.UDPConn` on Windows? I want this handle to set the `IP_MULTICAST_TTL` via `syscall.SetsockoptInt`. On Linux I do the following:
func setTTL(conn *net.UDPConn, ttl int) error {
f, err := conn.File()
if err != nil {
return err
}
defer f.Close()
fd := int(f.Fd())
return syscall.SetsockoptInt(fd, syscall.SOL_IP, syscall.IP_MULTICAST_TTL, ttl)
}
But on Windows, the implicit `dup` inside `*net.UDPConn`'s `File()` fails with:
>04:24:49 main.go:150: dup: not supported by windows
And in the source code is marked as a to-do. How can I get this handle? Is there some other way to set the TTL if not? | 0 | [
2,
164,
21,
4275,
9,
3192,
306,
1126,
103,
22,
18,
10315,
18,
9200,
9,
3203,
413,
27,
1936,
60,
800,
3726,
3726,
184,
107,
31,
5545,
14,
10974,
13,
1,
4980,
18,
9200,
9,
3203,
413,
1,
26,
21,
13,
1,
2483,
2328,
9,
3192,
306,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
prolog: parsing a sentence and generating a response in a simple language parser
===
so far I have the following working:
gen_phrase(S1,S3,Cr) :- noun_phrase(S1,S2,Cr1), verb_phrase(S2,S3,Cr2),
append([Cr1],[Cr2],Cr),add_rule(Cr).
question_phrase(S1,S5,Cr) :- ist(S1,S2),noun_phrase(S2,S3,Cr1),
noun_phrase(S3,S4,Cr2),
append([Cr1],[Cr2],Cr).
add_rule([X,Y]) :-
Fact =.. [Y, X],
assertz(Fact).
Given test run, code generates following:
1 ?- gen_phrase([the,comp456,is,a,computing,course],S3,Cr).
S3 = []
Cr = [comp456, computing_course].
add_rule(Cr) asserts existence of predicate computing_course(comp456).
Now what I would like to do is ask a question:
4 ?- question_phrase([is,the,comp456,a,computing,course],X,Cr).
Cr = [comp456, computing_course] .
What I need to do is extract computing_course and comp456, which I can do, then convert it into form accepted by prolog. This should look like Y(X) where Y = computing_course is a predicate and X = comp456 is atom. The result should be something similar to:
2 ?- computing_course(comp456).
true.
And later on for questions like "What are computing courses":
3 ?- computing_course(X).
X = comp456.
I thought about using assertz, however I still do not know how to call predicate once it is constructed. I am having hard time finding what steps need to be taken to accomplish this. (Using swi-prolog). | 0 | [
2,
895,
5567,
45,
2017,
18,
68,
21,
5123,
17,
13500,
21,
1627,
19,
21,
1935,
816,
2017,
4104,
800,
3726,
3726,
86,
463,
31,
57,
14,
249,
638,
45,
4380,
1,
13314,
870,
5,
18,
165,
15,
18,
240,
15,
6711,
6,
13,
45,
8,
12072,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Readig old V1.X MS Access file with MS Access 2010 installed
===
I'm new, so be gentle with me :)
I've created some C# code to read the schema definition of an MS Access files. It works great on most versions of Access, but when I try to read an older version of Access (V1.X) I'm getting the following error:-
This Property is not supported for external data sources or for databases created with a previous version of Microsoft Jet.
Here's my code:-
private DataTable ReadSchema(string strTable)
{
DataTable schemaTable = new DataTable();
try
{
OleDbConnection conn = new OleDbConnection("Provider= Microsoft.JET.OleDB.4.0;data source=R:\\CB Import\\CBS.MDB");
conn.Open();
OleDbCommand cmd = new OleDbCommand(strTable, conn);
cmd.CommandType = CommandType.TableDirect;
OleDbDataReader reader = cmd.ExecuteReader(CommandBehavior.SchemaOnly);
schemaTable = reader.GetSchemaTable();
reader.Close();
conn.Close();
DataColumn dcRec = new DataColumn("TableName", typeof(string));
dcRec.DefaultValue = strTable;
schemaTable.Columns.Add(dcRec);
schemaTable.Columns.Add("Type", typeof(string));
schemaTable.Columns.Add("Length", typeof(string));
foreach (DataRow r in schemaTable.Rows)
{
Console.WriteLine(r["ColumnName"].ToString() + " " + r["ColumnSize"].ToString() + " " + r["DataType"].ToString() + " " + r["NumericPrecision"].ToString() + " " + r["NumericScale"].ToString());
r["Type"] = r["DataType"];
r["Length"] = r["ColumnSize"];
}
}
catch (Exception e)
{
MessageBox.Show(e.Message);
}
return (schemaTable);
}
It bombs out on this line:
OleDbDataReader reader = cmd.ExecuteReader(CommandBehavior.SchemaOnly);
I have Access 2010 installed on my machine and even if I try to open these old troublesome files in this version of Access I still get errors about opening old versions.
This code all works fab apart from when I try to read an older version of Access. I can get around it by using Access 2007 (installed on another machine) and saving the database file as a 2007 version, but I'd like to be able to automate (code) this if possible? If there's another way of coding it, or something I'm messing up, please let me know.
Any help will be greatfully received and recipricated with beer, chocolate, flowers or whatever floats your boat :)
Thanks in advance. | 0 | [
2,
1302,
2816,
315,
566,
165,
9,
396,
4235,
1381,
3893,
29,
4235,
1381,
498,
4066,
800,
3726,
3726,
31,
22,
79,
78,
15,
86,
44,
5654,
29,
55,
13,
45,
6,
31,
22,
195,
679,
109,
272,
5910,
1797,
20,
1302,
14,
23874,
5465,
16,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
use quotation marks in regex, in quotation marks in C#
===
Note: all the quotation marks in this question are actually part of the code.
I'm learning regex, and i'm trying to scrape a site with music on it. I put the source of the site into a text file called 'ytcmusic.txt'. Here's a sample of the html:
<li><a href="angelpool%20-%20know.mp3"> angelpool - know.mp3</a></li>
<li><a href="angelpool%20-%20sellout.mp3"> angelpool - sellout.mp3</a></li>
<li><a href="angelpool%20-%20time.mp3"> angelpool - time.mp3</a></li>
<li><a href="bella%20-%20gibsons.mp3"> bella - gibsons.mp3</a></li>
i'll use the first line as an example, i'm trying to scrape only the "angelpool%20-%20know.mp3" and to do that here's the regex i used: ".*.mp3" ------ when I put it into C#, I have to surround it in quotation marks, which ruins the quotation marks in the regex. heres the code (it doesn't compile, if you remove one set of quotation marks around the regex, it does but obviously doesnt return the correct part of the source):
var sr = new StreamReader("ytcmusic.txt");
string str = sr.ReadToEnd();
var match = Regex.Match(str, @".*.mp3");
thanks in advance! | 0 | [
2,
275,
22786,
4872,
19,
7953,
1706,
15,
19,
22786,
4872,
19,
272,
5910,
800,
3726,
3726,
1945,
45,
65,
14,
22786,
4872,
19,
48,
1301,
50,
1121,
141,
16,
14,
1797,
9,
31,
22,
79,
2477,
7953,
1706,
15,
17,
31,
22,
79,
749,
20,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Call kill-rectangle from inside an interactive function
===
I'm trying to write a function that will:
1. If there is no region selected, then kill the current line.
2. If there a region selected, then kill the rectangle between point and mark.
By (2) I mean the same thing that happens if you run M-x kill-rectangle.
Here is my attempt at the function:
(defun cut-line-or-rectangle ()
"Cut rectangle if selection exists, cut line otherwise"
(interactive)
(if mark-active
(kill-rectangle (point) (mark))
(kill-whole-line)
)
)
This fullfils (1) but does nothing if a region is active. How can I make emacs obey the kill-rectangle function in this circumstance?
| 0 | [
2,
645,
1177,
8,
14673,
38,
15427,
37,
572,
40,
9194,
1990,
800,
3726,
3726,
31,
22,
79,
749,
20,
2757,
21,
1990,
30,
129,
45,
137,
9,
100,
80,
25,
90,
632,
1704,
15,
94,
1177,
14,
866,
293,
9,
172,
9,
100,
80,
21,
632,
17... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
jQuery callback when ajax request is finished loading
===
In jQuery is there a callback that can be used when an ajax request is finished loading. The reason I am wondering is because I'd like to display a loading gif until the the ajax request is finished. | 0 | [
2,
487,
8190,
93,
645,
1958,
76,
20624,
3772,
25,
842,
12797,
800,
3726,
3726,
19,
487,
8190,
93,
25,
80,
21,
645,
1958,
30,
92,
44,
147,
76,
40,
20624,
3772,
25,
842,
12797,
9,
14,
1215,
31,
589,
5712,
25,
185,
31,
22,
43,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0... |
JS - jQuery - Enable Disable form fields with checkbox
===
I want to disable an input Box AND a button when a checkbox is clicked .
My markup :
<h4>Random or Not </h4>
<!-- Use Random Image -->
<label><input name="o99_aufu_options[o99_aufu_random]" id="o99_aufu_options[o99_aufu_random]" value="1" checked="checked" type="checkbox">Use Random Image ? <em></em></label><br>
<!-- If the above not checked - needs to be enabled -->
Upload Image <label for="upload_image"> <input id="upload_image" size="36" name="o99_aufu_options[o99_aufu_upload_image]" value="" type="text"> <input id="upload_image_button" value="Choose Image or upload" type="button"> </label>
jQuery :
if (jQuery('#o99_aufu_options[o99_aufu_random]').is(':checked')) {
jQuery('#upload_image :input').attr('disabled', true);
} else {
jQuery('#upload_image_button,#upload_image :input').removeAttr('disabled');
}
well - obviously, if i am asking here - it is not working :-)
Fiddle :
http://jsfiddle.net/obmerk99/6jFMf/3/
Also as a bonus question - is it possible to do that only with the NAME of the input, omitting the ID from the markup ?
| 0 | [
2,
487,
18,
13,
8,
487,
8190,
93,
13,
8,
9240,
1460,
579,
505,
2861,
29,
2631,
5309,
800,
3726,
3726,
31,
259,
20,
1460,
579,
40,
6367,
1649,
17,
21,
5167,
76,
21,
2631,
5309,
25,
15802,
13,
9,
51,
943,
576,
13,
45,
13,
1,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
IE focus event randomly fails after ajax load
===
Currently, we're only supporting IE8.
I have an ajax call that gets data from the server, replaces the HTML in a container div with the response, then focus's in on an element contained in the response.
Depending on [IE Magic]? sometimes this code works, sometimes it doesn't. I need to find something that can work 100% of the time. The console.log statement logs the correct ID 100% of the time, even when the focus fails.
$.ajax({
type: 'POST',
url: that.Url,
contentType: 'application/json; charset=utf-8',
dataType: 'html',
data: dataToSend,
success: function (response) {
$(container).html(response);
that.initialize();
var element = document.getElementById(elementId);
setTimeout(function () {
setTimeout(function () {
setTimeout(function () {
setTimeout(function () {
setTimeout(function () {
setTimeout(function () {
console.log($(element).attr('id'));
element.focus();
}, 10);
}, 10);
}, 10);
}, 10);
}, 10);
}, 10);
}
The nested setTimeouts were there to see if maybe something else was being put on the stack during an earlier timeout. I tried it with a single setTimeout set to 1000, and was still seeing random failures. I've tried replacing `$(container).html(response);` with `$(container)[0].innerHTML = response;` and that still doesn't work consistently. I've tried replacing `document.getElementById(element)` with `$(container).find('#' + elementId)`. I've also tried moving `var element = document.getElementById(elementId);` into the setTimeout and am still seeing random failures. Using Firefox, 0 of the setTimeouts are needed and the code runs flawlessly, however that's not an option for us unfortunately. Changing `console.log` to `alert` does fix the issue, but only because it delays the focus until after 'ok' is clicked but that extra mouse click is awful for usability.
`that.initialize()` adds classes to new elements, adds events, modifies the widths/heights of new elements, etc... and all of that works 100% of the time. | 0 | [
2,
13,
660,
1776,
807,
21324,
13614,
75,
20624,
6305,
800,
3726,
3726,
871,
15,
95,
22,
99,
104,
3134,
13,
660,
457,
9,
31,
57,
40,
20624,
645,
30,
3049,
1054,
37,
14,
8128,
15,
3934,
18,
14,
13,
15895,
19,
21,
12147,
13,
1291... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
double as true / false
===
Bjarne suggests using the condition in if's as scope restriction. In particular this example.
if ( double d = fd() ) {
// d in scope here...
}
I'm curios how to interpret the declaration in a true / false sense.
1. It's a declaration
2. It's a double.
| 0 | [
2,
1494,
28,
1151,
13,
118,
4997,
800,
3726,
3726,
13,
11741,
18295,
5049,
568,
14,
2874,
19,
100,
22,
18,
28,
9914,
18732,
9,
19,
1498,
48,
823,
9,
100,
13,
5,
1494,
13,
43,
800,
398,
43,
5,
6,
13,
6,
13,
1,
12894,
13,
43... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
PIX DirectX 11 Debug Pixel Error
===
I recently updated my DirectX 11 (C++) application for dual-monitor, dual-window support. Ever since then, when I try to debug any pixel in the PIX debugger, I get the following error:
A call that previously succeeded failed during playback:
EID: 1375
Call: IDXGIFactory::CreateSwapChain()
HRESULT: DXGI_ERROR_INVALID_CALL
For more information click 'Help'.
I am no longer using D3D11CreateDeviceAndSwapChain, but instead using D3D11CreateDevice and then CreateSwapChain to create separate swap chains for each of two windows (one per monitor). I used the SDK sample MultiMon10 as a reference when making my changes, however I can still debug pixels without error when running the MultiMon10 sample project through PIX. So it can't just be a matter of "CreateSwapChain" not being PIX-friendly.
Any ideas what could be causing this error? Debugging pixels and stepping through shaders has helped me out a lot in the past and I'd hate to lose that capability. | 0 | [
2,
13,
18321,
1744,
396,
547,
121,
16254,
18146,
7019,
800,
3726,
3726,
31,
1989,
6372,
51,
1744,
396,
547,
13,
5,
150,
20512,
6,
3010,
26,
5747,
8,
2111,
242,
248,
15,
5747,
8,
27508,
555,
9,
462,
179,
94,
15,
76,
31,
1131,
2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How can I reshape without a unique "j" variable in Stata?
===
So here's my trouble: I'd like to reshape a long-format data file to wide. However, I don't have a unique "j" variable; each record in the long-format file has several key variables.
For example, I'd like to take this:
| caseid | gender | age | relationship to respondent|
|---------------------------------------------------|
| 1234 | F | 89 | mother |
| 1234 | F | 10 | daughter |
| 1235 | M | 15 | cousin |
etc
and turn it into this:
|caseid | gender1 | age1 | rel1 | gender2 | age2 | rel2 |
|--------------------------------------------------------------|
| 1234 | F | 89 | mother| F | 10 | daughter|
| 1235 | M | 15 | cousin| . | . | . |
etc
However, the data lack the suffix variable necessary for the reshape command. Is there a way that Stata will automatically generate this suffix?
| 0 | [
2,
184,
92,
31,
302,
25096,
366,
21,
2619,
13,
7,
728,
7,
7612,
19,
12819,
58,
60,
800,
3726,
3726,
86,
235,
22,
18,
51,
2572,
45,
31,
22,
43,
101,
20,
302,
25096,
21,
175,
8,
23588,
1054,
3893,
20,
1051,
9,
207,
15,
31,
2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Library for dragging elements from a palette to a HTML5 canvas
===
Wondering if anybody has heard about a JavaScript library which allows to drag elements (simple base graphs of different shape, which can be connected to each other) from a custom defined palette onto a (HTML5) canvas?
In the optimal case it would be possible to use SVG vector graphics to populate the palette.
On the one hand-side [raphael][1] seems to be too low-level (but very nice for drawing purposes) and on the other hand-side [Fabric.js][2] too specific for arranging SVG objects on the canvas.
[1]: http://raphaeljs.com/
[2]: http://fabricjs.com/ | 0 | [
2,
1248,
26,
13052,
2065,
37,
21,
27349,
20,
21,
13,
15895,
264,
9696,
800,
3726,
3726,
5712,
100,
11181,
63,
752,
88,
21,
8247,
8741,
1248,
56,
2965,
20,
5501,
2065,
13,
5,
24629,
1000,
7210,
18,
16,
421,
2539,
15,
56,
92,
44,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
is it possible to have javascript run after a plugin
===
I have a plugin that update some custom fields and I want to run some javascript to validate the fields and present the user with an alert message if required.... is this possible (dynamics crm 4)
Thanks,
Tim | 0 | [
2,
25,
32,
938,
20,
57,
8247,
8741,
485,
75,
21,
10922,
108,
800,
3726,
3726,
31,
57,
21,
10922,
108,
30,
11100,
109,
5816,
2861,
17,
31,
259,
20,
485,
109,
8247,
8741,
20,
7394,
1373,
14,
2861,
17,
734,
14,
4155,
29,
40,
7863... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
simple SQL query
===
I have the following data:
Student.Name; Student.RollNum; Student.Email; Student.Courses; Student.Birthday;
Course.ID ; Course.Name; Course.Instructor
Now heres my proposed DB design: two tables=> Students, Courses
Student.ID is a new field added-> primary unique key for Students table
Now what would be the query to retrieve all the courses taken by John Doe (whose Student.ID=1234) ??
I need the names of the courses, not the IDs.
| 0 | [
2,
1935,
4444,
255,
25597,
800,
3726,
3726,
31,
57,
14,
249,
1054,
45,
1209,
9,
7259,
73,
1209,
9,
8694,
6336,
73,
1209,
9,
62,
8079,
73,
1209,
9,
17556,
18,
73,
1209,
9,
21587,
1185,
73,
674,
9,
1340,
13,
73,
674,
9,
7259,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to validate the knowckout js form
===
I am using knockout JS in my asp.net Mvc Project. I could figure out the to display form and serialise json object and display data with the help of following link
http://stackoverflow.com/questions/11055336/how-to-use-knockout-js-with-asp-net-mvc-viewmodels
But I am not able to figure out the validation on form. What is the best solution to validate the form?
| 0 | [
2,
184,
20,
7394,
1373,
14,
143,
2601,
1320,
487,
18,
505,
800,
3726,
3726,
31,
589,
568,
11676,
487,
18,
19,
51,
28,
306,
9,
2328,
307,
8990,
669,
9,
31,
110,
1465,
70,
14,
20,
3042,
505,
17,
5956,
2628,
487,
528,
3095,
17,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
how to interpolate a matrix into desired size?
===
I want to interpolate a 58:2 matrix into 57:1 matrix.Actually I want to solve (A(t)-P2i(t))v(t)=dv/dt .i have p2i size as 57:1.A=[0 1;a0 a1]. where a0 a1 are also time varying after interpolating size of a0 and a1 are 57:1.so now size of A became 58:1.I am trying to solve above equation using ode45 but couldn't because dimensions of A and p2i are different. Can anyone help me with this? Thanks in advance. | 0 | [
2,
184,
20,
23336,
1373,
21,
8187,
77,
9264,
1072,
60,
800,
3726,
3726,
31,
259,
20,
23336,
1373,
21,
7216,
45,
135,
8187,
77,
6544,
45,
165,
8187,
9,
15661,
31,
259,
20,
8402,
13,
5,
58,
5,
38,
6,
8,
306,
135,
49,
5,
38,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
CSS Drop down menu with skewed first layer
===
Im trying to create a menu with drop down options. The trick is the first level of options are skewed and the child elements should not be . I cant unskew the links a hrefs in the parent without unskewing the the parent list tag..
<body>
<ul id="nav">
<li class="rhombus"><a class="rhlink" href="#">1 HTML</a>
<ul>
<li><a href="#">3.2 Mootools</a></li>
<li><a href="#">3.3 Prototype</a></li>
</ul>
</li>
<li class="rhombus"><a class="rhlink" href="#">2 CSS</a></li>
<li class="rhombus"><a class="rhlink" href="#">3 Javascript</a>
<ul>
<li><a href="#">3.1 jQuery</a>
<ul>
<li><a href="#">3.1.1 Download</a></li>
<li><a href="#">3.1.2 Tutorial</a></li>
</ul>
</li>
<li><a href="#">3.2 Mootools</a></li>
<li><a href="#">3.3 Prototype</a></li>
</ul>
</li>
</ul>
</body>
CSS:
#nav, #nav ul{
margin:0;
padding:0;
list-style-type:none;
list-style-position:outside;
position:relative;
line-height:1.5em;
}
#nav a:link, #nav a:active, #nav a:visited{
display:block;
padding:0px 5px;
border:1px solid #333;
color:#fff;
text-decoration:none;
background-color:#00ff21;
}
#nav a:hover{
background-color:#fff;
color:#333;
}
#nav li{
float:left;
position:relative;
}
li.rhombus{
float:left;
position: relative;
transform: skew(35deg);
-webkit-transform: skew(35deg);
-moz-transform: skew(35deg);
-ms-transform: skew(35deg);
-o-transform: skew(35deg);
}
#nav ul {
position:absolute;
width:12em;
top:1.5em;
display:none;
transform: skew(-35deg);
-webkit-transform: skew(-35deg);
-moz-transform: skew(-35deg);
-ms-transform: skew(-35deg);
-o-transform: skew(-35deg);
}
#nav li ul a{
width:12em;
float:left;
}
#nav ul ul{
top:auto;
}
#nav li ul ul {
left:12em;
margin:0px 0 0 10px;
transform: skew(-0deg);
-webkit-transform: skew(-0deg);
-moz-transform: skew(-0deg);
-ms-transform: skew(-0deg);
-o-transform: skew(-0deg);
}
#nav li:hover ul ul, #nav li:hover ul ul ul, #nav li:hover ul ul ul ul{
display:none;
}
#nav li:hover ul, #nav li li:hover ul, #nav li li li:hover ul, #nav li li li li:hover ul{
display:block;
} | 0 | [
2,
272,
18,
18,
2804,
125,
11379,
29,
13,
5835,
458,
43,
64,
5385,
800,
3726,
3726,
797,
749,
20,
1600,
21,
11379,
29,
2804,
125,
6368,
9,
14,
5514,
25,
14,
64,
662,
16,
6368,
50,
13,
5835,
458,
43,
17,
14,
850,
2065,
378,
5... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
ios iphone get device model and make?
===
I was wondering if it's possible to determine what kind of iPhone (for example) the currentdevice is? I know it's possible to get the model through
<code>NSString *deviceType = [[UIDevice currentDevice] model];</code>
which will just return whether I have an "iPhone" or an "iPod", BUT I was wondering if it's possible to detect/know if I have an iPhone 3GS vs. and iPhone 4 vs. an iPhone 4S _(in actuality, all I really want to do is determine if I have a 3G or not, because I'm doing fairly graphics intensive stuff)_.
So yeah, let me know, thank you! | 0 | [
2,
13,
7760,
21024,
164,
3646,
1061,
17,
233,
60,
800,
3726,
3726,
31,
23,
5712,
100,
32,
22,
18,
938,
20,
3746,
98,
825,
16,
21024,
13,
5,
1106,
823,
6,
14,
866,
546,
18507,
25,
60,
31,
143,
32,
22,
18,
938,
20,
164,
14,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
rewriting an sql script to include mysql commands and not SQLPlus commands
===
what is the best way to replace SQLPlus commands with mysql commands if you are trying to produce a report form a certain sql query
setpagesize 66
setlinesize 75
what is the best way to replace this is mysql. I have searched all over the net and cannot find any replacement. Also i am setting my title as
ttitle center 'EOMData(U), 2
column year heading "Year" formatt 999
column month heading 'Month' format 99
column day heading "day" format 99
select year,month,day from TB_EOMData order by year,month ,day;
it claims that setpagesize is an undelcared variable. Is my syntax correct for generating a report from a table named EOMData?
| 0 | [
2,
302,
12646,
40,
4444,
255,
3884,
20,
468,
51,
18,
22402,
14294,
17,
52,
4444,
255,
13349,
14294,
800,
3726,
3726,
98,
25,
14,
246,
161,
20,
3934,
4444,
255,
13349,
14294,
29,
51,
18,
22402,
14294,
100,
42,
50,
749,
20,
2213,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
DbSet Add method does not support inheritance?
===
I have the following POCO classes:
Public Class CompetitionSubscription
Public Property ID As Long
Public Overridable Property CompetitionID As Long
Public Overridable Property CompetitionPlayerID As Long
Public Property CompetitionStrength As Short?
Public Property StrengthWithinSection As Short?
End Class
<NotMapped()>
Public Class FullCompetitionSubscription
Inherits CompetitionSubscription
Public Property Competition As Competition
Public Property CompetitionPlayer As CompetitionPlayer
End Class
And a DbContext of just one table like this:
Public Class CompetitionSubscriptionsDB
Inherits DbContext
Public Property CompetitionSubscriptions As DbSet(Of CompetitionSubscription)
End Class
I have written a unit test like this:
<TestMethod()>
Public Sub AddSubscriptionToDatabase()
Using db = New CompetitionSubscriptionsDB
Dim subscription = New FullCompetitionSubscription With
{.CompetitionID = 1,
.CompetitionPlayerID = 1,
.CompetitionStrength = 2,
.StrengthWithinSection = 12}
db.CompetitionSubscriptions.Add(DirectCast(subscription, CompetitionSubscription))
db.SaveChanges()
End Using
End Sub
This fails with the folllowing error (translated from Dutch so probably not the exact message):
*No Metadata found for EntityType CompetitionSubscriptionsLib.FullCompetitionSubscription*.
As the `FullCompetitionSubscription` class is adorned with the `<NotMapped>` attribute I can understand the error message, but the point of the `DirectCast` was to "sell" the `FullCompetitionSubscription` as a base `CompetitionSubscription` to the `DbContext` (If I change the type of `subscription` to `CompetitionSubscription` the test passes).
Where do I go wrong? | 0 | [
2,
13,
9007,
3554,
3547,
2109,
630,
52,
555,
13852,
60,
800,
3726,
3726,
31,
57,
14,
249,
2353,
716,
2684,
45,
317,
718,
1076,
7563,
8741,
872,
317,
1354,
4924,
28,
175,
317,
84,
5175,
579,
1354,
1076,
1340,
28,
175,
317,
84,
51... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Spriting error/problems in Compass 0.12
===
Something has caused a local failure. Rolling back to older versions of the codebase still return the same failure. Deleting the entire repo, re-cloning it, uninstalling compass, reinstalling, etc. still yields the same error.
mycomputer:myproject(master) me$ compass watch --trace
>>> Change detected at 14:13:14 to: app/app.sass
remove assets/images/sprites-sf0f45583b2.png
NoMethodError on line ["24"] of /Users/me/.rvm/gems/ruby-1.9.3-p194/gems/chunky_png-1.2.5/lib/chunky_png/chunk.rb: undefined method `unpack' for nil:NilClass
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/chunky_png-1.2.5/lib/chunky_png/datastream.rb:78:in `from_io'
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/chunky_png-1.2.5/lib/chunky_png/datastream.rb:66:in `block in from_file'
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/chunky_png-1.2.5/lib/chunky_png/datastream.rb:66:in `open'
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/chunky_png-1.2.5/lib/chunky_png/datastream.rb:66:in `from_file'
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/chunky_png-1.2.5/lib/chunky_png/canvas/png_decoding.rb:53:in `from_file'
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/lib/compass/sass_extensions/sprites/engines/chunky_png_engine.rb:15:in `block in construct_sprite'
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/lib/compass/sass_extensions/sprites/engines/chunky_png_engine.rb:14:in `each'
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/lib/compass/sass_extensions/sprites/engines/chunky_png_engine.rb:14:in `construct_sprite'
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/lib/compass/sass_extensions/sprites/sprite_methods.rb:62:in `generate'
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/lib/compass/sass_extensions/functions/sprites.rb:122:in `sprite_url'
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/lib/compass/sass_extensions/sprites/sprite_map.rb:72:in `method_missing'
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/lib/compass/sass_extensions/sprites/sprite_map.rb:63:in `to_s'
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/script/list.rb:44:in `block in to_s'
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/script/list.rb:44:in `map'
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/script/list.rb:44:in `to_s'
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/perform.rb:238:in `visit_prop'
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/base.rb:37:in `visit'
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/perform.rb:20:in `visit'
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/base.rb:53:in `block in visit_children'
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/base.rb:53:in `map'
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/base.rb:53:in `visit_children'
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/perform.rb:29:in `block in visit_children'
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/perform.rb:41:in `with_environment'
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/perform.rb:28:in `visit_children'
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/base.rb:37:in `block in visit'
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/perform.rb:259:in `visit_rule'
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/base.rb:37:in `visit'
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/perform.rb:20:in `visit'
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/base.rb:53:in `block in visit_children'
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/base.rb:53:in `map'
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/base.rb:53:in `visit_children'
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/perform.rb:29:in `block in visit_children'
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/perform.rb:41:in `with_environment'
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/perform.rb:28:in `visit_children'
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/base.rb:37:in `block in visit'
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/perform.rb:125:in `visit_if'
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/base.rb:37:in `visit'
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/perform.rb:20:in `visit'
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/perform.rb:128:in `visit_if'
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/base.rb:37:in `visit'
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/perform.rb:20:in `visit'
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/perform.rb:146:in `block in visit_import'
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/perform.rb:146:in `map'
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/perform.rb:146:in `visit_import'
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/base.rb:37:in `visit'
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/perform.rb:20:in `visit'
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/perform.rb:146:in `block in visit_import'
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/perform.rb:146:in `map'
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/perform.rb:146:in `visit_import'
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/base.rb:37:in `visit'
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/perform.rb:20:in `visit'
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/perform.rb:146:in `block in visit_import'
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/perform.rb:146:in `map'
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/perform.rb:146:in `visit_import'
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/base.rb:37:in `visit'
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/perform.rb:20:in `visit'
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/base.rb:53:in `block in visit_children'
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/base.rb:53:in `map'
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/base.rb:53:in `visit_children'
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/perform.rb:29:in `block in visit_children'
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/perform.rb:41:in `with_environment'
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/perform.rb:28:in `visit_children'
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/base.rb:37:in `block in visit'
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/perform.rb:49:in `visit_root'
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/base.rb:37:in `visit'
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/perform.rb:20:in `visit'
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/perform.rb:7:in `visit'
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/root_node.rb:20:in `render'
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/engine.rb:308:in `_render'
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/engine.rb:255:in `render'
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/lib/compass/compiler.rb:140:in `block (2 levels) in compile'
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/lib/compass/compiler.rb:126:in `timed'
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/lib/compass/compiler.rb:139:in `block in compile'
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/lib/compass/logger.rb:45:in `red'
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/lib/compass/compiler.rb:138:in `compile'
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/lib/compass/compiler.rb:118:in `compile_if_required'
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/lib/compass/compiler.rb:103:in `block (2 levels) in run'
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/lib/compass/compiler.rb:101:in `each'
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/lib/compass/compiler.rb:101:in `block in run'
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/lib/compass/compiler.rb:126:in `timed'
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/lib/compass/compiler.rb:100:in `run'
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/lib/compass/commands/watch_project.rb:147:in `recompile'
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/lib/compass/commands/watch_project.rb:68:in `perform'
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/lib/compass/commands/base.rb:18:in `execute'
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/lib/compass/commands/project_base.rb:19:in `execute'
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/lib/compass/exec/sub_command_ui.rb:43:in `perform!'
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/lib/compass/exec/sub_command_ui.rb:15:in `run!'
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/bin/compass:30:in `block in <top (required)>'
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/bin/compass:44:in `call'
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/bin/compass:44:in `<top (required)>'
/Users/me/.rvm/gems/ruby-1.9.3-p194/bin/compass:19:in `load'
/Users/me/.rvm/gems/ruby-1.9.3-p194/bin/compass:19:in `<main>'
/Users/me/.rvm/gems/ruby-1.9.3-p194/bin/ruby_noexec_wrapper:14:in `eval'
/Users/me/.rvm/gems/ruby-1.9.3-p194/bin/ruby_noexec_wrapper:14:in `<main>'
LoadError on line ["70"] of /Users/me/.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/lib/compass/commands/watch_project.rb: cannot load such file -- fssm
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/lib/compass/commands/watch_project.rb:70:in `perform'
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/lib/compass/commands/base.rb:18:in `execute'
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/lib/compass/commands/project_base.rb:19:in `execute'
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/lib/compass/exec/sub_command_ui.rb:43:in `perform!'
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/lib/compass/exec/sub_command_ui.rb:15:in `run!'
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/bin/compass:30:in `block in <top (required)>'
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/bin/compass:44:in `call'
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/bin/compass:44:in `<top (required)>'
/Users/me/.rvm/gems/ruby-1.9.3-p194/bin/compass:19:in `load'
/Users/me/.rvm/gems/ruby-1.9.3-p194/bin/compass:19:in `<main>'
/Users/me/.rvm/gems/ruby-1.9.3-p194/bin/ruby_noexec_wrapper:14:in `eval'
/Users/me/.rvm/gems/ruby-1.9.3-p194/bin/ruby_noexec_wrapper:14:in `<main>' | 0 | [
2,
13,
18,
6944,
1203,
7019,
118,
2740,
2854,
79,
18,
19,
18879,
713,
9,
918,
800,
3726,
3726,
301,
63,
1497,
21,
375,
2990,
9,
3929,
97,
20,
1234,
3281,
16,
14,
1797,
8436,
174,
788,
14,
205,
2990,
9,
121,
1336,
68,
14,
1078,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Fix msysGit Portable $HOME location
===
I have successfully installed and configured msysGit Portable on my flash drive, and have used it to pull and push GitHub repos. However, I seem to always have to kludge the SSH support.
Specifically, in order for SSH to find my key files, I have to follow [these instructions][1] to start a second instance of `ssh-agent` and then `ssh-add` my key every time I run git-bash.bat.
Using the output of `ssh -v git@github.com` to debug I see that msysGit defaults to my Windows user directory to look for keys. It can't do that; I need it to look in its own directory on the portable drive.
How can I force $HOME to be the program's own folder?
[1]: http://chickenandbeans.vox.com/library/post/weird-ssh-agent-error-could-not-open-a-connection-to-your-authentication-agent.html | 0 | [
2,
6098,
4235,
93,
18,
10404,
13469,
5579,
8167,
1474,
800,
3726,
3726,
31,
57,
3673,
4066,
17,
28895,
4235,
93,
18,
10404,
13469,
27,
51,
4433,
1493,
15,
17,
57,
147,
32,
20,
2201,
17,
3250,
13,
10404,
20926,
302,
12551,
9,
207,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
MySQL query display problem.
===
I have this query that should display all posts related to a
specific tag but for some reason it will only display one result instead of all the results can some one help me fix this problem?
Here is MySQL code.
"SELECT users.*, users_posts.*, tags.*, posts_tags.*,
FROM users
INNER JOIN users_posts ON users_posts.user_id = users.user_id
INNER JOIN posts_tags ON users_posts.id = posts_tags.article_id
INNER JOIN tags ON posts_tags.tag_id = tags.id
WHERE tags.tag = '" . $tag_id . "'
GROUP BY tags.tag"
Here is my MySQL table.
CREATE TABLE posts_tags (
id INT UNSIGNED NOT NULL AUTO_INCREMENT,
tag_id INT UNSIGNED NOT NULL,
users_posts_id INT UNSIGNED NOT NULL,
PRIMARY KEY (id)
);
CREATE TABLE tags (
id INT UNSIGNED NOT NULL AUTO_INCREMENT,
tag VARCHAR(255) NOT NULL,
PRIMARY KEY (id)
);
CREATE TABLE users_posts (
id INT UNSIGNED NOT NULL AUTO_INCREMENT,
user_id INT UNSIGNED NOT NULL,
content TEXT NOT NULL,
PRIMARY KEY (id)
);
CREATE TABLE users (
user_id INT UNSIGNED NOT NULL AUTO_INCREMENT,
name VARCHAR(255) NOT NULL,
pass CHAR(40) NOT NULL,
PRIMARY KEY (user_id)
); | 0 | [
2,
51,
18,
22402,
25597,
3042,
1448,
9,
800,
3726,
3726,
31,
57,
48,
25597,
30,
378,
3042,
65,
9868,
1597,
20,
21,
1903,
3383,
47,
26,
109,
1215,
32,
129,
104,
3042,
53,
829,
700,
16,
65,
14,
1736,
92,
109,
53,
448,
55,
6098,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Anchor tag doesn't link properly in webkit-based browsers only
===
I have an anchor tag that doesn't behave correctly in webkit-based browsers. I originally thought that it was because I have a regular expression to dynamically turn urls in a string of text to proper anchor tags. I removed all dynamic code and animations, and I still had the same issue. I also tried giving the element an enormous z-index, but that didn't work either. While playing with it, I noticed that the mouseover event is getting triggered, but the click event is not.
The URL is <a href="http://stream9.net">http://stream9.net</a>. When you hover over the Twitter bird, our most recent tweet pulls out from the right and reveals the url at the end. Any help is greatly appreciated. | 0 | [
2,
6265,
3383,
1437,
22,
38,
3508,
7428,
19,
2741,
13703,
8,
1281,
16495,
18,
104,
800,
3726,
3726,
31,
57,
40,
6265,
3383,
30,
1437,
22,
38,
14149,
12044,
19,
2741,
13703,
8,
1281,
16495,
18,
9,
31,
912,
289,
30,
32,
23,
185,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
django i18n_patterns hide default lang_code from url
===
I'm using the i18n_patterns to add a prefix of current lang_code to my url.
urlpatterns += i18n_patterns('',
url(r'^', include('blaszczakphoto2.gallery.urls')),
)
It allowes me to get urls like `/en/about-us/` , `/pl/about-us/` etc..
My default language is `pl`
LANGUAGE_CODE = 'pl'
I want url like /about-us/ for clients viewing my site in polish lenguage. Is there any way to hide lang_code prefix from url for default lang_code? | 0 | [
2,
3857,
14541,
31,
1087,
103,
1,
5972,
8766,
18,
3077,
12838,
4544,
1,
9375,
37,
287,
6362,
800,
3726,
3726,
31,
22,
79,
568,
14,
31,
1087,
103,
1,
5972,
8766,
18,
20,
3547,
21,
14315,
16,
866,
4544,
1,
9375,
20,
51,
287,
636... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Like Google Maps - Just local
===
I was looking to find a solution to our product. We have a geo-location, on a web based dashboard that does not have internet connection.
I was looking for a product that allows you to have local maps and a script, I found OpenLayers which seems cool although weights 22gb.
Do you know if there are other solutions to generate map locally that takes less space?
Thanks in advance. | 0 | [
2,
101,
8144,
6867,
13,
8,
114,
375,
800,
3726,
3726,
31,
23,
699,
20,
477,
21,
4295,
20,
318,
2374,
9,
95,
57,
21,
6389,
8,
19032,
15,
27,
21,
2741,
432,
26478,
30,
630,
52,
57,
2620,
2760,
9,
31,
23,
699,
26,
21,
2374,
3... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Articles not appearing after publishing through .NET to Umbraco
===
I have a .NET(C#) script which is pulling news articles from an XML file. Everything works fine, but when it comes to publishing them, and appearing on the web page, something's not quite right.
Here's the code so far:
try {
newNode.Save();
newNode.Publish(User.GetUser(0)); //0 is default user
}
catch (Exception ex) {
// error message
}
umbraco.library.UpdateDocumentCache(newNode.Id);
As you can see, what I'm trying to publish is newNode. It's first saved and then published through User 0, which has publishing rights, and then the document cache is updated. The problem is that it appears in the back end of Umbraco, but the document link is simply a single hash (#), and it doesn't display on the web page.
Can anyone suggest why this method of publishing wouldn't work? | 0 | [
2,
3376,
52,
4870,
75,
3107,
120,
13,
9,
2328,
20,
13,
723,
2559,
716,
800,
3726,
3726,
31,
57,
21,
13,
9,
2328,
5,
150,
5910,
6,
3884,
56,
25,
3303,
996,
3376,
37,
40,
23504,
3893,
9,
796,
693,
1123,
15,
47,
76,
32,
1624,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Show app name next to the icon in news feed
===
When I post is published using the application on facebook, there is a small icon below, next to the like button. I want to add application name or some custom text right next to that icon. Below is a screenshot of twitter app that does what I mean. Posts are published using open graph api. Any ideas?
![enter image description here][1]
[1]: http://i.stack.imgur.com/rLIyF.png | 0 | [
2,
298,
4865,
204,
328,
20,
14,
9801,
19,
996,
4063,
800,
3726,
3726,
76,
31,
678,
25,
467,
568,
14,
3010,
27,
9090,
15,
80,
25,
21,
284,
9801,
1021,
15,
328,
20,
14,
101,
5167,
9,
31,
259,
20,
3547,
3010,
204,
54,
109,
5816... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
IE9 background:filter and jquery click events
===
Weird problem this, I'm using a CSS3 gradient to create a faded out overlay effect (ala lightbox).
In IE9, I've noticed (due to me using filter: progid:DXImageTransform.Microsoft.gradient) that my overlay layer isn't clickable, and doesn't stop me clicking and hovering below.
I've created a fiddle:
http://jsfiddle.net/tJPF6/
Expected behaviour:
Click on the numbers.
Modal window appears.
CANNOT hover over numbers to get hover effect.
CAN click anywhere on the overlay to close it.
IE9 behaviour:
Click on the numbers.
Modal window appears.
CAN hover over numbers to get hover effect.
CANNOT click anywhere on the overlay to close it.
Has anyone had any experience with this? I could go back to using a PNG, but would prefer to stick with the gradient if possible.
| 0 | [
2,
13,
660,
518,
2395,
45,
11924,
815,
17,
487,
8190,
93,
10840,
963,
800,
3726,
3726,
5455,
1448,
48,
15,
31,
22,
79,
568,
21,
272,
18,
18,
240,
17442,
20,
1600,
21,
8056,
70,
84,
4414,
1590,
13,
5,
4242,
471,
5309,
6,
9,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
IOS App Not Displaying Options Correctly
===
I've got a strange situation..
We developed an ipad app a bit ago and we are getting reports of it sometimes not functioning correctly. We used UIPickerView to create a few navigational menus. So on the home page the wheel displays with a list of options.. one of those options leads to another page where there is another picker wheel with more options.
The problem is that sometimes when the user presses the first wheel to go to the second the wheel is blank.. there are no options for them to choose.. the user then has to go back out to the main selection wheel and press the first link again... when they do it the second time the options are available?
I have the app on my ipad as well but have not been able to generate the same result... any ideas as to why this may happen every now and then? Most of the time it works fine... anyone ever run across this before? | 0 | [
2,
13,
7760,
4865,
52,
17418,
6368,
12044,
800,
3726,
3726,
31,
22,
195,
330,
21,
2578,
1858,
9,
9,
95,
885,
40,
31,
8240,
4865,
21,
1142,
1464,
17,
95,
50,
1017,
2813,
16,
32,
1030,
52,
14175,
12044,
9,
95,
147,
13,
5661,
168... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Field api, defining new fields and getting/setting values
===
I'm able to create a field, using
<pre><code>
$form['title'] = array( '#type' => 'text', '#value' => 'Drupal');
</pre></code>
1) But I want to be able to get/set the value from the database. How would I do it?
2 )P.S. what's the point of having a '#" in front of type and value ? | 0 | [
2,
575,
21,
2159,
15,
14684,
78,
2861,
17,
1017,
118,
19831,
4070,
800,
3726,
3726,
31,
22,
79,
777,
20,
1600,
21,
575,
15,
568,
13,
1,
3515,
1,
9375,
1,
5579,
4190,
2558,
22,
22235,
22,
500,
800,
7718,
5,
13,
22,
5910,
4474,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Writing procedures for multi-tenant database, schema as variable
===
I am designing a multi-tenant database. Many actions that are needed on a per-tenant basis have been written as stored procedures. Almost all of them use dynamic SQL execution since I have not found a way to differentiate between the schemas other than with dynamic statements.
EXEC( 'SELECT * FROM ' + @SchemaName + '.Contacts' )
Is there any way to create a variable representing the schema so I can call the select statements without building them dynamically?
SELECT * FROM @TheSchema.Contacts
SQL Server 2008 | 0 | [
2,
1174,
8876,
26,
1889,
8,
1316,
1830,
6018,
15,
23874,
28,
7612,
800,
3726,
3726,
31,
589,
15026,
21,
1889,
8,
1316,
1830,
6018,
9,
151,
3078,
30,
50,
851,
27,
21,
416,
8,
1316,
1830,
2239,
57,
74,
642,
28,
8214,
8876,
9,
55... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How are files written to any given file system?
===
I'm trying to find a resource from which I could learn how any given file is being written to a file system, data is being appended to it and then how the file is closed.
At this stage of my inquiry, the type of file system irrelevant. | 0 | [
2,
184,
50,
6488,
642,
20,
186,
504,
3893,
329,
60,
800,
3726,
3726,
31,
22,
79,
749,
20,
477,
21,
6577,
37,
56,
31,
110,
2484,
184,
186,
504,
3893,
25,
142,
642,
20,
21,
3893,
329,
15,
1054,
25,
142,
4865,
10726,
20,
32,
17... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
R: Is there a standard way to document data frames
===
Given a data frame, DF, it is simple to save DF as an R object using 'save()' and share with co-workers. However, it is often necessary to attach a separate document explaining precise column definitions. Is there a (standard/common) way to include this information with the object?
If we built a package for DF we could create a help page explaining all these details, like the built-in datasets. Thus the data and explanation would always be available and we need only share a single package source file. However, building a package seems over-kill for this problem. (As a side benefit, we would gain version control on the data set as changes would increment the package version number).
The Hmisc package includes the 'label()' function, which adds a new attribute to objects. Associated methods for subsetting/creating/etc data.frames are included to propagate the new attribute (since attributes are in general dropped by most functions).
Setting attributes is an obvious alternative to writing a package, and we can add arbitrarily named attributes.
A brief example:
DF <-
structure(list(Gender = structure(c(1L, 1L, 1L, 2L, 2L, 2L), .Label = c("Female",
"Male"), class = "factor"), Date = structure(c(15518, 15524,
15518, 15526, 15517, 15524), class = "Date"), Dose = c(15, 10,
11, 11, 12, 14), Reaction = c(7.97755180189919, 11.7033586194156,
9.959784869289, 6.0170950790238, 1.92480908119655, 7.70265419443507
)), .Names = c("Gender", "Date", "Dose", "Reaction"), row.names = c(NA,
-6L), class = "data.frame")
library(Hmisc)
label(DF$Reaction) <- "Time to react to eye-dot test, in seconds, recorded electronically"
# or we could set our own attributes
attr(DF$Date,"Description") <- "Date of experiment. Note, results are collected weekly from test centres"
# Since Hmisc adds class "labelled" to data.frame and impelments
# the appropriate methods, the formed is retained on subsetting
# (not that this is feature is wanted)
DF.mini <- DF[ DF$Gender=="Male",]
# compare
str(DF) # Not quite sure why str() prints the label attribute but not the Desciptions
str(DF.mini) # we retain the label attribute
attributes(DF$Date)
attributes(DF.mini$Date) # we lose the Description attribute
So my questions:
1. Do people include extra information with their objects (my example is a data frame, but applies to all R objects), keeping all the relevant information in one place?
2. If yes, how?
3. Curious, why does str() print the label attribute, I believe the Hmisc package has added another function/method somewhere, but couldn't see why - can someone explain that bit? | 0 | [
2,
761,
45,
25,
80,
21,
1236,
161,
20,
4492,
1054,
12809,
800,
3726,
3726,
504,
21,
1054,
3523,
15,
13,
8736,
15,
32,
25,
1935,
20,
2079,
13,
8736,
28,
40,
761,
3095,
568,
13,
22,
19863,
5,
6,
22,
17,
1891,
29,
326,
8,
16355... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Why is this field not showing up in the results?
===
When I run the selects below, I do not get Field3 in the result set, why?
Select
a.Field1,
a.Field2,
a.Field3,
sum(IsNull(a.Field4, 0)) AS SomeAlias1,
a.SomeField5,
a.SomeField6,
a.SomeField7
From SomeTable a
INNER JOIN SomeView1 v on v.au = a.au
inner join (select Username, House from Users userBuildings where UserName = @UserName) as userHouses on userHouses.au = a.au
WHERE
(((where claus logic here....
Group BY a.Field1,
a.Field2,
a.SomeAlias1,
a.Field3,
a.Field4,
a.Field5,
a.Field6,
a.Fielf7
)
Select
transBudget.Field1,
transBudget.Field2,
transDiscount.Field4,
... some other fields...
IsNull(transDiscount.Actual, 0) - IsNull(transBudget.Actual, 0) AS Variance
from (Select * from Transactdions Where TransDesc = 'Budget') AS transBudget
FULL OUTER JOIN
(Select * from Transactions Where TransDesc = 'Discount') AS transDiscount
ON transBudget.Market = transDiscount.Market AND transBudget.SubMarket = transDiscount.SubMarket
I see every field except Field3 for some reason and it's beyond me how the heck this can happen. | 0 | [
2,
483,
25,
48,
575,
52,
3187,
71,
19,
14,
1736,
60,
800,
3726,
3726,
76,
31,
485,
14,
5407,
18,
1021,
15,
31,
107,
52,
164,
575,
240,
19,
14,
829,
309,
15,
483,
60,
5407,
21,
9,
1109,
165,
15,
21,
9,
1109,
135,
15,
21,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Maven dependency conflict with Jersey
===
Im developing a rest service with jersey. The project got several modules. My dependencies for my facade module are:
<?xml version="1.0"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org /xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>com-myproject</artifactId>
<groupId>com.myproject</groupId>
<version>1.0-SNAPSHOT</version>
</parent>
<groupId>com.myproject.facade</groupId>
<artifactId>com-myproject-facade</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>com-myproject-facade Jersey Webapp</name>
<properties>
<jersey-version>1.8</jersey-version>
</properties>
<dependencies>
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-server</artifactId>
<version>${jersey-version}</version>
</dependency>
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-json</artifactId>
<version>${jersey-version}</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.8.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-client</artifactId>
<version>${jersey-version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.glassfish.distributions</groupId>
<artifactId>web-all</artifactId>
<version>10.0-build-20080430</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.glassfish.embedded</groupId>
<artifactId>gf-embedded-api</artifactId>
<version>1.0-alpha-4</version>
<scope>test</scope>
</dependency>
<!-- Hyperlinking -->
</dependencies>
<repositories>
<repository>
<id>glassfish.java.net</id>
<name>GlassFish Maven Repository</name>
<url>http://download.java.net/maven/glassfish</url>
</repository>
<repository>
<id>m2.java.net</id>
<name>Java.net Maven 2 Repository</name>
<url>http://download.java.net/maven/2</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>m2.java.net</id>
<name>Java.net Maven 2 Repository</name>
<url>http://download.java.net/maven/2</url>
</pluginRepository>
</pluginRepositories>
<build>
<finalName>com-bachelor-facade</finalName>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<inherited>true</inherited>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<groupId>org.glassfish</groupId>
<artifactId>maven-glassfish-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
It works.
When I add a new dependency for hypermedia with jersey:
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-server-linking</artifactId>
<version>${jersey-version}</version>
</dependency>
I get a pom error in this facade project and in all other sibling modules, beacause they depend on the facade module.
In the facade project I get the error about missing artifacts:
22.06.12 11:11:02 MESZ: Missing artifact com.sun.jersey:jersey-server:jar:1.8:compile
22.06.12 11:11:02 MESZ: Missing artifact asm:asm:jar:3.1:compile
22.06.12 11:11:02 MESZ: Missing artifact com.sun.jersey:jersey-core:jar:1.8:compile
22.06.12 11:11:02 MESZ: Missing artifact com.sun.jersey:jersey-json:jar:1.8:compile
22.06.12 11:11:02 MESZ: Missing artifact org.codehaus.jettison:jettison:jar:1.1:compile
22.06.12 11:11:02 MESZ: Missing artifact stax:stax-api:jar:1.0.1:compile
and so on.
The other modules depend on this project an get the error:
Build errors for com-myproject-core; org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal on project com-myproject-core: Could not resolve dependencies for project com.myproject.core:com-bachelor-myproject:war:1.0-SNAPSHOT: Failed to collect dependencies for [com.myproject.facade:com-myproject-facade:jar:1.0-SNAPSHOT (compile), com.sun.jersey:jersey-server:jar:1.8 (compile), com.sun.jersey:jersey-json:jar:1.8 (compile), junit:junit:jar:4.8.2 (test), com.sun.jersey:jersey-client:jar:1.8 (test), org.glassfish.distributions:web-all:jar:10.0-build-20080430 (test), org.glassfish.embedded:gf-embedded-api:jar:1.0-alpha-4 (test), log4j:log4j:jar:1.2.14 (provided)]
I think I just need to maven install the changed project with maven and then the other projects get fixed. But I cant do maven install, because the changed project pom is red too caused by missing artifacts. How to fix this?
| 0 | [
2,
1216,
3124,
26835,
2930,
29,
2134,
800,
3726,
3726,
797,
3561,
21,
760,
365,
29,
2134,
9,
14,
669,
330,
238,
17113,
9,
51,
29411,
26,
51,
7224,
12613,
50,
45,
13,
1,
60,
396,
8184,
615,
3726,
7,
165,
9,
387,
7,
60,
1,
13,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Custom Progress Dialog Animation
===
I am working on `Custom Progress Dialog`. I've set its style like done in this SO question <http://stackoverflow.com/questions/7738490/positionning-the-spinning-wheel-in-a-custom-progress-dialog> My progress dialog is showing no animation at all. When I changed the `background` to `black` then it was only showing a black box. I want my progress dialog to animate.
Any help is appreciated in advance | 0 | [
2,
5816,
3455,
28223,
6236,
800,
3726,
3726,
31,
589,
638,
27,
13,
1,
4636,
6015,
3455,
28223,
1,
9,
31,
22,
195,
309,
82,
1034,
101,
677,
19,
48,
86,
1301,
13,
1,
21127,
6903,
25325,
2549,
9990,
9,
960,
118,
24652,
18,
118,
4... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Taking too much time and timeout for executing the reorder function in doctrine 2
===
Taking too much time and timeout for executing the reorder function in doctrine 2
reordering process taking ages to complete
$em = Zend_Registry::getInstance ()->entitymanager;
$repo = $em->getRepository ( 'Teon_Model_Folder' );
$nodes = $repo->getRootNodes();
$repo->reorder($nodes [0] , 'title'); | 0 | [
2,
741,
266,
212,
85,
17,
85,
1320,
26,
25836,
14,
302,
7861,
1990,
19,
7521,
172,
800,
3726,
3726,
741,
266,
212,
85,
17,
85,
1320,
26,
25836,
14,
302,
7861,
1990,
19,
7521,
172,
302,
7861,
68,
953,
741,
5520,
20,
1279,
5579,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
symfony redirect in a function
===
In my project I use the framework as Symfony2. I wanted to write a php function that redirect to a default page if a condition fails. so my function was like this.
public function validate($value){
if($value==null){
return $this->redirect($this->generateUrl('home_page',array("message"=>"")));
}
}
and I call the function like this.
$this->validate($value);
problem is redirect does not happens.
please guys, help me. I don't know why it is not redirecting.
Thanks | 0 | [
2,
13,
7261,
10229,
93,
302,
14706,
19,
21,
1990,
800,
3726,
3726,
19,
51,
669,
31,
275,
14,
6596,
28,
13,
7261,
10229,
93,
135,
9,
31,
417,
20,
2757,
21,
13,
26120,
1990,
30,
302,
14706,
20,
21,
12838,
2478,
100,
21,
2874,
13... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
excel formula, how to filter String text cell?
===
I want to use SUMPROCUT function on condition that the sheet's row count is unknown.<br /><br />
so the formula was writen by *=SUMPRODUCT(--F:F,--G:G)*, after Enter key be pressed *#VALUE!* showed up.<br /><br />
I realized that columns name are string type but they were included in calculation, that could be the problem. <br />
how to avoid String text in SUMPRODUCT function? or maybe you have a smarter way, please help.
thanks in advanced! | 0 | [
2,
20700,
3729,
15,
184,
20,
11945,
3724,
1854,
1667,
60,
800,
3726,
3726,
31,
259,
20,
275,
3907,
2740,
4118,
1990,
27,
2874,
30,
14,
6125,
22,
18,
3131,
2468,
25,
2562,
9,
1,
5145,
13,
118,
1,
5145,
13,
118,
1,
86,
14,
3729,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
HtmlUnit: How to forcefully close WebConnection?
===
Working with HtmlUnit behind a proxy server I've come across this limitation (?).
Some of the script tags in the page I'm loading require a js file from across the network, while following ones all point to a local address (excluded from the proxy).
So:
<!-- SCRIPT ONE -->
<script src="www.far-away.net/engine.js"></script>
<!-- SCRIPT TWO -->
<script src="/js/utils.js"></script>
As I'm expecting, `SCRIPT ONE` goes through the proxy and hits.
As I'm NOT expecting, `SCRIPT TWO` through the proxy goes too, but starts a nasty redirect cycle ending in an internal server error (from the proxy).
After much googling, reading friendly manuals, trial and error, headbanging and the like...
I can tell that the problem is that the connection used by `SCRIPT ONE` doesn't get closed (HTTP headers "Connection : keep-alive" and "Proxy-Connection : keep-alive" are set).
Closing the connection with a crock does the trick:
if (response.getResponseHeaderValue("Connection").equalsIgnoreCase("keep-alive")) {
webClient.setWebConnection(new HttpWebConnection(this.webClient));
}
But [`WebClient.setWebConnection(WebConnection)`](http://htmlunit.sourceforge.net/apidocs/com/gargoylesoftware/htmlunit/WebClient.html#setWebConnection(com.gargoylesoftware.htmlunit.WebConnection) "HtmlUnit JavaDoc") is marked as `INTERNAL API` with warning to use at your own risk, so...
Is there a **clean** and **official** way to forcefully close `WebClient`'s connection? | 0 | [
2,
13,
15895,
15464,
45,
184,
20,
25830,
543,
2741,
25996,
872,
60,
800,
3726,
3726,
638,
29,
13,
15895,
15464,
439,
21,
27188,
8128,
31,
22,
195,
340,
464,
48,
24943,
13,
5,
60,
6,
9,
109,
16,
14,
3884,
3383,
18,
19,
14,
2478... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Cause a Linux poll event on a shared memory file
===
Two Linux processes open and mmap the same /dev/shm/ shared memory file and use it as common memory. Question: what is the simplest and best way for one process to "wake up" the other process to notify that it should look in the memory?
For example, can one process cause a poll() event for the other process's file descriptor?
The solution doesn't need to be portable but I would like it to be simple. | 0 | [
2,
1679,
21,
13024,
4994,
807,
27,
21,
2592,
1912,
3893,
800,
3726,
3726,
81,
13024,
5102,
368,
17,
1620,
2552,
14,
205,
13,
118,
14438,
118,
18,
7015,
118,
2592,
1912,
3893,
17,
275,
32,
28,
757,
1912,
9,
1301,
45,
98,
25,
14,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to mock ObjectResult.FirstOrDefault() using Moq
===
I'm doing an ASP.Net MVC2 project and developing some unit test cases on it. In one of my controllers,
String AllowedActions = "";
AllowedActions = entities.sp_IsAuthorized(GetLoggedUserId(), 1, item.SubCategoryId, "CreateMeeting_HTML").FirstOrDefault();
I was unable to mock this sp_IsAuthorized() method ,
public ObjectResult<global::System.String> sp_IsAuthorized(.....){
}
I tried to mock it in this way,
var entity = new Mock<TestMVCProductEntities>();
entity.Setup(x => x.sp_IsAuthorized(...)).Return(???);
but I have no clue how to return
ObjectResult<global::System.String>
this type of object. Help me.
| 0 | [
2,
184,
20,
10506,
3095,
29955,
9,
3552,
248,
13862,
9708,
5,
6,
568,
1873,
1251,
800,
3726,
3726,
31,
22,
79,
845,
40,
28,
306,
9,
2328,
307,
8990,
135,
669,
17,
3561,
109,
1237,
1289,
1871,
27,
32,
9,
19,
53,
16,
51,
9919,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Add effects to asp:chart control
===
I am using asp:Chart to show graph. The graph is displayed when the page is loaded. I want to add effect to chart control like the bar should slowly go up from 0 to some value(depends on y value). How can I add such effect with asp:chart??
This is my code for graph in .aspx page.
<asp:Chart ID="DashboardGraph" runat="server" BackColor="#D3DFF0" Palette="BrightPastel"
BorderDashStyle="Solid" BackGradientStyle="TopBottom" BorderWidth="2" BorderColor="26, 59, 105"
ImageLocation="~/TempImages/ChartPic_#SEQ(500,3)" Width="500px" Height="350px">
<Titles>
<asp:Title ShadowColor="32, 0, 0, 0" Font="Trebuchet MS, 14.25pt, style=Bold" ShadowOffset="3"
Text="Inventory Statistics" ForeColor="26, 59, 105">
</asp:Title>
</Titles>
<Legends>
<asp:Legend Docking="Right" BackColor="Transparent">
</asp:Legend>
</Legends>
<BorderSkin SkinStyle="Emboss"></BorderSkin>
<Series>
<asp:Series Name="ProductName" ChartType="Column" YValueType="Int32" IsValueShownAsLabel="true">
</asp:Series>
</Series>
<ChartAreas>
<asp:ChartArea Name="ChartArea1" BorderColor="64, 64, 64, 64" BorderDashStyle="Solid"
BackSecondaryColor="Transparent" BackColor="64, 165, 191, 228" ShadowColor="Transparent"
BackGradientStyle="TopBottom" >
<Area3DStyle Rotation="10" Inclination="15" WallWidth="0" />
<AxisY LineColor="64, 64, 64, 64" LabelAutoFitMaxFontSize="8" Title="Quantity" >
<LabelStyle Font="Trebuchet MS, 8.25pt, style=Bold" />
<MajorGrid LineColor="64, 64, 64, 64" />
</AxisY>
<AxisX LineColor="64, 64, 64, 64" LabelAutoFitMaxFontSize="8" Interval="1" TitleAlignment="Near" Title="Products">
<LabelStyle Font="Trebuchet MS, 8.25pt, style=Bold" />
<MajorGrid LineColor="64, 64, 64, 64" />
</AxisX>
</asp:ChartArea>
</ChartAreas>
</asp:Chart>
Below is the code for to bind asp:chart with data table
DataTable dtGraph = objDashboard.GetDahboardGraphData();
DashboardGraph.DataSource = dtGraph;
DashboardGraph.Series["ProductName"].XValueMember = "ProductName";
DashboardGraph.Series["ProductName"].YValueMembers = "Total";
DashboardGraph.DataBind(); | 0 | [
2,
3547,
2292,
20,
28,
306,
45,
5433,
38,
569,
800,
3726,
3726,
31,
589,
568,
28,
306,
45,
5433,
38,
20,
298,
7210,
9,
14,
7210,
25,
6115,
76,
14,
2478,
25,
8572,
9,
31,
259,
20,
3547,
1590,
20,
1795,
569,
101,
14,
748,
378,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
can i insert jquery mobile in a appmobi xdk app
===
i am new in appmobi and i want to know if i can insert jquery mobiel in my app because i tried
to insert the code from that site http://jquerymobile.com/test/docs/about/getting-started.html
but it doesn't work.Also i tried to us aux_web of appmobbi but it has erros. any help it would be great.
this is the erros:
Uncaught TypeError: Cannot read property 'availableTransitions' of undefined jq.ui.min.js:133
Uncaught TypeError: Cannot read property 'availableTransitions' of undefined all.js:58
Uncaught TypeError: Cannot set property 'autoLaunch' of undefined index.html:61
Resource interpreted as Font but transferred with MIME type font/truetype: | 0 | [
2,
92,
31,
14692,
487,
8190,
93,
3241,
19,
21,
4865,
79,
14398,
993,
43,
197,
4865,
800,
3726,
3726,
31,
589,
78,
19,
4865,
79,
14398,
17,
31,
259,
20,
143,
100,
31,
92,
14692,
487,
8190,
93,
7327,
8487,
19,
51,
4865,
185,
31,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
No date response header in node.js 0.8
===
According to the [documentation][1] the Date response header should be sent by default.
var http = require('http');
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end('Hello World\n');
}).listen(1337, '127.0.0.1');
console.log('Server running at http://127.0.0.1:1337/');
Curling the sample above I get:
C:\Users\Hans>curl localhost:1337 -i
HTTP/1.1 200 OK
Content-Type: text/plain
Connection: keep-alive
Transfer-Encoding: chunked
Hello World
No Date header. Even when I set `response.sendDate = true` I get no Date header. What is wrong?
[1]: http://nodejs.org/api/http.html#http_response_senddate
| 0 | [
2,
90,
1231,
1627,
157,
106,
19,
15421,
9,
728,
18,
713,
9,
457,
800,
3726,
3726,
496,
20,
14,
636,
28132,
857,
500,
2558,
165,
500,
14,
1231,
1627,
157,
106,
378,
44,
795,
34,
12838,
9,
4033,
7775,
800,
4077,
5,
22,
21127,
22... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to use Java to connect to PostgreSQL remotely
===
I have been working on a project which requires us to connect to our PostgreSQL database. I was able to connect locally with my code to the PostgreSQL database using a local IP(i.e. 192.168.1.145) now that I replaced the local IP with the public IP it throws me errors:
Here is the code I am using to connect to the database
private static final String DRIVER = "org.postgresql.Driver";
//private static final String URL = "jdbc:postgresql://192.168.1.145:5432/ResumeDatabase";
private static final String URL = "jdbc:postgresql://71.555.555.555:5432/ResumeDatabase";
private static final String USERNAME = "defaultuser";
private static final String PASSWORD = "password";
private static Connection getConnection() throws Exception {
Class.forName(DRIVER);
Connection conn = DriverManager.getConnection(URL, USERNAME, PASSWORD);
return conn;
}
Thanks! | 0 | [
2,
184,
20,
275,
8247,
20,
6379,
20,
678,
6879,
18,
22402,
23288,
800,
3726,
3726,
31,
57,
74,
638,
27,
21,
669,
56,
4781,
182,
20,
6379,
20,
318,
678,
6879,
18,
22402,
6018,
9,
31,
23,
777,
20,
6379,
6680,
29,
51,
1797,
20,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Is validation necessary with TCP?
===
I had to implement an application which in very short, sent packets every few seconds to a server, when the server received them it send a response to the client which only then proceeded to send another packet. This sounds all good but we were using TCP and the responses came as soon as the server got the packet and not post-processing or anything like that. So that makes me wonder, why would you do something like this? The client had a queue where I kept all the packets and did something like this:
try {
send packet // exception is thrown if connection is lost
remove packet from queue
} catch exception {
try to reconnect
}
so in this case the packet gets removed from the queue only if the *send* was successful.
Any idea about this? Is this best practice? I would appreciate if someone could clear this for me.
Thanks
| 0 | [
2,
25,
27999,
2378,
29,
13,
38,
7439,
60,
800,
3726,
3726,
31,
41,
20,
8713,
40,
3010,
56,
19,
253,
502,
15,
795,
12795,
18,
352,
310,
2582,
20,
21,
8128,
15,
76,
14,
8128,
420,
105,
32,
2660,
21,
1627,
20,
14,
6819,
56,
104... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Drupal 6: How to get cck fields also by views_get_view without changing the Row style?
===
Specifcation: Drupal 6.x, Views 2.x, CCK 2.9.x
I have set up a View without display panels (only Defaults) (by the Views UI administration panel), and submitted the fields I need from the node. The "Row style" is "Fields", and I want to let so. I have also some CCK fields in the View, which does not want to show up by calling the 'views_get_view' method.
I need these settings (mentioned above), because at the view I finetuned the fields to show up accurately. | 0 | [
2,
15708,
6720,
9523,
184,
20,
164,
272,
2601,
2861,
67,
34,
4146,
1,
3060,
1,
4725,
366,
4226,
14,
3131,
1034,
60,
800,
3726,
3726,
12737,
821,
16893,
45,
15708,
6720,
400,
9,
396,
15,
4146,
172,
9,
396,
15,
272,
2601,
172,
9,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Having different record formats vs Having separate display files
===
Is it better to have different display files for each category of an application being developed on AS400 or will creating different record formats (or RECORD format type for multiple files within same DSPF) be suitable.
I have 4 screens to be displayed.Should i create 4 different DSPF files or 4 different format types within 1 DSPF,please guide.
| 0 | [
2,
452,
421,
571,
13767,
4611,
452,
1725,
3042,
6488,
800,
3726,
3726,
25,
32,
574,
20,
57,
421,
3042,
6488,
26,
206,
3230,
16,
40,
3010,
142,
885,
27,
28,
7114,
54,
129,
2936,
421,
571,
13767,
13,
5,
248,
571,
2595,
1001,
26,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Iphone Language Detection
===
in my app i need to implement with 16 languages.
my webservice guys provided me list of languages with domain ids.
I have detected and compared both.
In my app i am giving a table view called select language.
when i select language ,i need to redirect to the specific language with domain id.
Domainid is for webservices.
they have given me the webservices as follows
www.euroclinix.net/memberarea.php?domain id=29
so for 16 languages there will be 16 domains.
How can i do this?
when i run the app first time It should be default in English language.
I have did my googling but not succeeded so far
Here we should not use localization | 0 | [
2,
21024,
816,
11643,
800,
3726,
3726,
19,
51,
4865,
31,
376,
20,
8713,
29,
347,
2556,
9,
51,
2741,
11449,
2776,
1173,
55,
968,
16,
2556,
29,
4603,
13,
9178,
9,
31,
57,
11968,
17,
2428,
156,
9,
19,
51,
4865,
31,
589,
1438,
21,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
sending post form ckeditor only works with two submits
===
I have an issue sending post vars form a form with ajax and jquery to php mysql. It´s sounds very strange. When I submit the form all my fields always are inserted except one textfield from ckeditor, but submittng again I have the last insert response from ckeditor. So I don´t have the last information. Sorry for my english.
my form basic fields:
<form class="largeform" id="editform" name="editform" action="" method="post">
//ckeditor
<label for="post_content" style="display:none;">Cuerpo de la página</label>
<textarea id="post_content" name="post_content" ></textarea>
//end ckeditor
<input class="submit" type="submit" name="Guardar" id="Submit" value="submit" />
ajax:
$(document).ready(function(){
$("div.notification-box-success").hide();
$("div.notification-box-error").hide();
$("div.notification-box-warning").hide();
$("div.notification-box-info").fadeIn(200).show();
$("#editform").submit(function(event) {
event.preventDefault();
// we want to store the values from the form input box, then send via ajax below
var post_title = $('#post_title').attr('value');
var post_metad = $('#post_metad').attr('value');
var post_metak = $('#post_metak').attr('value');
var post_special = $('#post_special').attr('value');
var post_content = $('#post_content').attr('value');
var post_private = $('#post_private').attr('value');
var post_parent = $('#post_parent').attr('value');
var post_template = $('#post_template').attr('value');
var post_id = $('#post_id').attr('value');
var post_menu = $('#post_menu').attr('value');
var post_menu_order = $('#post_menu_order').attr('value');
if(post_title=='')
{
$('.notification-box-success').fadeOut(200).hide();
$('.notification-box-error').fadeIn(200).show();
$('.notification-box-info').fadeOut(200).hide();
}
else
{
$.ajax({
type: "POST",
url: "insert.php",
data: $("#editform").serialize(),
success: function(){
//$('form#editform').hide(function(){$('div.success').fadeIn();});
$('.notification-box-success').fadeIn(200).show();
$('.notification-box-error').fadeOut(200).hide();
//$('.notification-box-info').fadeOut(200).hide();
}
});
}
return false;
});
}); | 0 | [
2,
4907,
678,
505,
13,
2601,
13401,
104,
693,
29,
81,
12298,
18,
800,
3726,
3726,
31,
57,
40,
1513,
4907,
678,
4033,
18,
505,
21,
505,
29,
20624,
17,
487,
8190,
93,
20,
13,
26120,
51,
18,
22402,
9,
32,
13,
18,
2795,
253,
2578,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
C# - Loading Properties.Settings from a different file at runtime
===
Is there any way to load settings from a different file other than the default `App.config` file at runtime? I'd like to do this after the default config file is loaded.
I use the `Settings.Settings` GUI in Visual Studio to create my `App.config` file for me. The config file ends up looking like this:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<section name="SnipeetTester.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</sectionGroup>
</configSections>
<applicationSettings>
<SnipetTester.Properties.Settings>
<setting name="SettingSomething" serializeAs="String">
<value>1234</value>
</setting>
</SnipetTester.Properties.Settings>
</applicationSettings>
</configuration>
In code, I'm able to access the settings like this:
Console.WriteLine("Default setting value: " + Properties.Settings.Default.SettingSomething);
The idea is that when the application is run, I should be able to specify a config file at run time and have the application load the config file into the `Properties.Settings.Default` object instead of using the default `app.config` file. The formats of the config files would be the same, but the values of the settings would be different.
I know of a way to do this with the `ConfigurationManager.OpenExeConfiguration(configFile);`. However, in the tests that I've run, it doesn't update the `Properties.Settings.Default` object to reflect the new values from the config file. | 0 | [
2,
272,
5910,
13,
8,
12797,
3704,
9,
19831,
18,
37,
21,
421,
3893,
35,
485,
891,
800,
3726,
3726,
25,
80,
186,
161,
20,
6305,
12410,
37,
21,
421,
3893,
89,
119,
14,
12838,
13,
1,
7753,
9,
14093,
2816,
1,
3893,
35,
485,
891,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Threads, Coro, Anyevent confusion
===
I am relatively new to perl and even newer to threading in perl. I have a perl script that takes input from 3 different sources. (2 LDAP queries and a file that isn't always there) Because some parts can take longer than others so I decided to use threads and queues. During development, testing individual components of the script worked very well, but after putting it all together the performance seems to degrade.
Basic structure is this
2 threads:(Read file or Read AD entries) -> Queue1 -> 2 threads:(scrub data) -> Queue2 -> 3-4 threads(compare against existing local LDAP entries). Several threads report statistics back to the main script and once all threads are done an email is sent with all the stats and status of that run.
I am using dequeue_nb and I thought that would help but no luck.
The performance hit seems to be in the queues. While looking for tips to improve performance I've run into several articles saying perl threads are no good and to use coro, POE, Anyevent, IO:async, etc.
This doesn't seem like a "event" problem so I didn't think AnyEvent or POE would be the way to go by from what I'm seeing, coros only seems to use one CPU at a time so I'm not sure this would work either. I thought about using a combination of them but then my head started to hurt. Does anyone have any suggestions on how to either fix/troubleshoot my script or any suggestions how to implement one of the other modules?
| 0 | [
2,
20396,
15,
20685,
15,
186,
4943,
38,
5677,
800,
3726,
3726,
31,
589,
3109,
78,
20,
416,
255,
17,
166,
12372,
20,
9322,
68,
19,
416,
255,
9,
31,
57,
21,
416,
255,
3884,
30,
1384,
6367,
37,
203,
421,
2662,
9,
13,
5,
135,
64... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Error running a program
===
When I try to run my program in Eclipse, this error appears:
[2012-07-08 22:02:05 - Dex Loader] Unable to execute dex: (class: com/android/dx/dex/file/UniformListItem, method: toHuman signature: ()Ljava/lang/String;) Illegal local variable number
[2012-07-08 22:02:05 - CheckApp] Conversion to Dalvik format failed: Unable to execute dex: (class: com/android/dx/dex/file/UniformListItem, method: toHuman signature: ()Ljava/lang/String;) Illegal local variable number
What's the problem and what should I do?<br />
Thanks for everyone who will help! | 1 | [
2,
7019,
946,
21,
625,
800,
3726,
3726,
76,
31,
1131,
20,
485,
51,
625,
19,
11652,
15,
48,
7019,
1780,
45,
636,
3212,
8,
2984,
8,
3099,
1024,
21825,
18718,
13,
8,
121,
396,
6305,
106,
500,
2343,
20,
15644,
121,
396,
45,
13,
5,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to Include an unparsed external entity value in a XML?
===
I have an xml syntax error with this example :
<?xml version="1.0"?>
<!DOCTYPE foo [
<!ENTITY rules SYSTEM "file://data.txt">
]>
<extract>
<data>&rules;</data>
</extract>
where data.txt contains :
1 <15024
2 >15023
But of course I have syntax error because there are wml special chars in the text file ( < > ). So how can I include these data as unparsed data ?
I hope to have something like this result :
<?xml version="1.0"?>
<extract>
<data><![CDATA[1 <15024
2 >15023]]></data>
</extract>
| 0 | [
2,
184,
20,
468,
40,
367,
3574,
18,
69,
4886,
9252,
1923,
19,
21,
23504,
60,
800,
3726,
3726,
31,
57,
40,
23504,
22649,
7019,
29,
48,
823,
13,
45,
13,
1,
60,
396,
8184,
615,
3726,
7,
165,
9,
387,
7,
60,
1,
13,
1,
187,
1379... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.