Say i got a variable,
var s = "\"\\\"abc\\\"\"";
which is unescaped to "\"abc\"" when i display in the browser.
But i need it to be further unescaped to the actual value "abc".
I was going to use the scuttle solution on: http://www.pui.ch/phred/archives/2005/04/tags-database-schemas.html for handling searches on my website. I was wondering how I could take the search input from a user and turn it into a single query.
For instance, let's say a user inputted 'blue dogs' in their search query... How could I dynamically update the query to include ('blue', 'dogs') in union and intersection queries?
Say suppose i am running a java program through command line. and this program requires some data to enter during the execution. So i was wondering on what happens if somebody uses javaw to run this type of program? that is how can enter the data to the program.
For aesthetic reasons, I want to show a form on top of another form, just as if it were a component, say like a TPanel. It should resize with the parent, move around as th eparent is drageed by its title bar, etc.
-----------------------------
| main form component 1 |
-----------------------------
| main | the 'embedded' |
| form | form goes here |
|comp 2| |
-----------------------------
can I do that? If so how?
I know that I can use DOMDocument and DOMXPath to manipulate XML files. But, I really love JQuery, and it would be great if there was something more like JQuery in the PHP world that I could use for sever side DOM manipulation.
NOTE: I'm only interested here in how
JQuery Selects and Manipulates the DOM, not all
the other parts of JQuerry (I guess
you can say just the Pop and the Sizzle
parts).
I am using AutoCompleteTextView and want to limit the number of dropdown items visible at a time on screen. Currently it fills up the screen but can i limit it to say 2 items with a scroll bar for displaying more.
For example if I say I have three classes A, B, and C where B and C have a composition relation ship with A. That means the life of B and C is handled by A, and also B and C cannot access directly from the outside.
For some reason my DataService class needs to return objects of B and C as It cant return a object of A as B and C cannot be initialized at the same time. (to be able to initializeC you have to initializeB first).
So that I'm returning DataTables from DataService and then inside the class A those data tables are converted to B / C objects.
If B and C objects cannot be initialized at the same time is it valid to say that B and C have a composition relationship with A?
If its composition is it must to generate A with B and C inside?
What is the proper way to handle this sort of a problem?
EDIT:
Following code explains the way I'm doing it now with DataTables.
Example:
class A
{
private List<B> B;
private List <C> C;
public A()
{
B= new List<B>();
C= new List<C>();
}
public List<B> GetB( DataTable dt)
{
// Create a B list from dt
return B;
}
}
class Presenter
{
private void Show B()
{
_View.DataGrid = A.GetB(DataService.GetAListOfB());
}
}
The actual scenario is I have a class called WageInfo and classes Earning and Deduction having a composition relationship in the design. But for you to generate Deductions first you should Generate earnings and should be saved in a table. Then only you can generate deductions for the earnings to calculate balance wages.
Also note that these contained classes have a one to many relationship with the containing class WageInfo. So actually WageInfo has a List<Earnings> and List<Deduction>
My initial question was, is it ok if my DataService class returns Deductions / Earnings objects (actually lists) not a WageInfo?
Still not clear?
Hi,
Lets say I have a string " Hello World"
How can I use a regular expression to return the number of spaces I have in the string. In this case it would be '2'.
Thanks
When dealing with websites with large amount of javascript, i see that these are still usually served to the client as one large javascript file.
In the development phase, are the javascript files usually split up (say there are 300 lines of js) to make things abit more manageable, and then merged when the website is 'put live'? Or do the developers just put up with working in one long large file?
Say I have:
class A
{
A()
{}
~A()
{}
};
class B
{
public:
B()
{}
~B()
{}
private:
static A mA;
};
B* pB = new B;
delete pB;
When I call delete pB, B's destructor will be called. Will this then call the destructor for static member A?
How to I run multiple threads in VB.NET?
Say I need 2 threads - one that prints 100 numbers in a loop and the second one that asks for the user's name and prints it inside a message box.
My slides say that:
A recursive call should always be on a smaller data structure than the current one
There must be a non recursive option if the data structure is too small
You need a wrapper method to make the recursive method accessible
Just reading this from the slides makes no sense, especially seeing as it was a topic from before christmas!
Could anyone try and clear up what it means please?
Thank you
I have the following idea: when the user clicks on the more... button of a grid row, the row must expand into a detailed state that shows additional details for the current entry. I know that xamwebgrid provides an expand command, but isn't it just for hierarchical data purposes? How can I display some movie screenshots let's say, only in expanded view ?
Which are the private methods available to change the settings of the iPhone, say Toggling Wifi, 3G.
I know this will be rejected by the AppStore , But still curious to know how, atleast could be used for jailbroken device.
I tried creating a new SSIS package and when I tried Doping a Data Flow Source (say OLEDB Source). I get the error The Component cannot be added to the Data Flow task. With the following Additional information
ADDITIONAL INFORMATION:
Interface not registered (Exception from HRESULT: 0x80040155) (Microsoft.SqlServer.DTSPipelineWrap)
Say I have this piece of code:
var marker = new google.maps.Marker({
position: location,
title: 'Búfals',
map: map
});
This creates a marker as expected but if I hover the mouse over it I don’t see 'Búfals'
as I would expect (instead I see the html code).
This doesn't make any difference:
var marker = new google.maps.Marker({
position: location,
title: unescape('Búfals'),
map: map
});
Any ideas?
Thanks.
has anyone used the uStorelocation extension for Magento (to embed Google maps)? what goes into the field named "Default Location Address" under
System Configurations Store Locations
The docs don't say anything about this and the screen shots on the extension page just show "97236". any ideas? thanks
I have an MySQL table with 25000 rows.
This is an imported CSV file so I want to look at the last ten rows to make sure it imported everything.
However, since there is no ID column, I can't say:
SELECT * FROM big_table ORDER BY id DESC
What SQL statement would show me the last 10 rows of this table?
The structure of the table is simply this:
columns are: A, B, C, D, ..., AA, AB, AC, ... (like Excel)
all fields are of type TEXT
Is it safe to say that there is no such thing as a right outer join in LINQ?
I know to effectively create one, you'd just swap the tables in a left outer join. But can you apply the DefaultIfEmpty() method to the table on the left side of the equijoin to make it a right outer join?
Why do people say that business logics should be implemented on the server side code (e.g. EJB) and not on the client application code?
The example that I have in mind is a business object validation on a EJB based architecture. Does it really have to be delegated to the EJB or is it ok to run it on the client before the object is sent to be server to be saved?
Hi
does anybody familiar with a way that I could implement a matrix with values from a field (not the real or complex number, but lets say Z mod p). so I could perform all the operation of matlab on the matrix (with the values of the chosen field)
Ariel
Hello,
I need to create a script file with the Insert statements for the records I select in the mysql table.
For Instance, when i do Select * from emp where empid = 5, and say i get 10 records as result.
Now I should create a script file with the insert statements of that 10 records to emp table.
I am using C# as code behind...
How?
Hi,
I am trying to break away from using tables in my formatting, and am trying out using userlist html tags <ul>
Say I have a panel with 10 controls, and I want a 3 columns display, therefore 3 controls in each row, and a total of 4 rows for 10 controls.
Should I use 4 different <ul> or should I just stack them inside one <ul>
Please tell me the advantages and disadvantages
Thanks
Hi All,
I have a web view that is loaded with an HTML that contains links (
ref).
when I switch to another activity (say to another tab in a tab
activity) and then switching back to it, the link is surrounded with
an orange rectangle. also happens in the GoogleAdView which really
makes it impossible to view.
can someone explains this?
thanks,
Ori