for writing images on a html page i want to write only " after closing are anyone tell me about this then how i can write this
means to say that
<img src = " <% code is here %> " />
Why is the following syntax correct:
x = y+++y;
(Where it means y++ + y or y + ++y which both mean y * 2 + 1)
But this is not valid syntax:
x = y+++++y;
(Which should mean y++ + ++y, which must mean y and increase y and then add ++y which increases y thus y * 2 + 2)
Is there a reason for this?
First off, I know the title is generic and not fitting. I just couldn't think of a title that could describe my problem.
I have a table Recipients in MySQL structured like this:
id | email | status
1 foo@bar S
2 bar@baz S
3 abc@def R
4 sta@cko B
I need to convert the data into the following XML, depending on the status field. For example:
<Recipients>
<RecipientsSent>
<!-- Have the 'S' status -->
<recipient>foo@bar</recipient>
<recipient>bar@baz</recipient>
</RecipientsSent>
<RecipientsRegexError>
<recipient>abc@def</recipient>
</RecipientsRegexError>
<RecipientsBlocked>
<recipient>sta@cko</recipient>
</RecipientsBlocked>
</Recipients>
I have this PHP code to implement this ($recipients contains an associative array of the db table):
<Recipients>
<RecipientsSent>
<?php
foreach ($recipients as $recipient):
if ($recipient['status'] == 'S'):
echo "<recipient>" . $recipient['email'] . "</recipient>";
endif;
endforeach;
?>
</RecipientsSent>
<RecipientsRegexError>
<?php
foreach ($recipients as $recipient):
if ($recipient['status'] == 'R'):
echo "<recipient>" . $recipient['email'] . "</recipient>";
endif;
endforeach;
?>
</RecipientsRegexError>
<?php /** same loop for the B status */ ?>
</Recipients>
So, this means that if I have 1000 entries in the table and 4 different status' that can be checked, it means that there will be 4 loops, each one executing 1000 times.
How can this be done in a more efficient manner? I thought about fetching four different sets from the database, meaning 4 different queries, would that be more efficient? I'm thinking it could be done with one loop but but I can't come up with a solution.
Any way this could be done with only one loop?
Hi,
With the following entity relationship structure I'm struggling to figure out if the relationship between the LOAN and ITEM is valid?
The weak entity of Loan uses a partial key of 'loan_dateLeant' and the primary keys from CUSTOMER and ITEM to form its primary key.
However LOAN has a 'one to many' relationship with ITEM as a loan can consist of more than one item.
But surely this means that if more than one item is loaned, then the loan record will have two item_id values for part of its primary key?
I'm using Guzzle 4 (latest version) to upload file to a remote server, since it uses stream to upload the $response-getStatusCode() will be 100 which means "Continue" and the responseBody is not available at this point.
Is there a way to catch the remote server response when the upload is done?
Edit 1:
I was able to call back to a function when the upload is done using this:
https://github.com/guzzle/progress-subscriber
However, I haven't found out how to get the response yet
IF some says to me to build webisite in java. What does that mean.
That means building in core java, java servlets , jsp , java beans , j2ee or what.
What thing i need to learn if some tells me to make webiste in java.
Just like there are ready made login scripts in php , are those available in java as well
thanks
I am working on a project that runs in Chrome in full-screen mode and displays data that can be edited and interacted with. It makes AJAX calls(using jQuery) frequently that cause a loading notification in the lower left-hand corner on the bottom of the screen to pop up.
These notifications are distracting when you are viewing the display and I would like to remove/prevent Chrome from displaying these loading notifications at all. Is it possible to prevent these notification by any means, or perhaps even mask the javascript that causes these notifications?
If relatedProductsArea contains NO images then HIDE the div.
<div id="RelatedProductsArea" style="border-radius: 7px 7px 7px 7px;"><br clear="all"><div style="clear:both;"></div>
</div>
Finding NO images means there are no related products.
What i have tried:
$('#RelatedProductsArea').has('img').css('border', 'none');
Heres an example: http://jsfiddle.net/K2Cp6/
I want to change the max upload file limit dynamically. means by not changing the php.ini file on server.
Whenever user had uploaded more then 2 mb then my upload limit should be change.
I want to do all this through php.
Thanks in advance.
I want to store mutable array in sqlite database field. Is there any way to serialize array means convaert array into serializaible string and store in to database field. while retrieve time i can deserialize that string. please help me
While moving from php to rails (Means procedural language to Object oriented language), what are the various things you should keep in mind.
How to think in world of object oriented programming?
What are thinks i should kept in mind before starting the things. Any tips?
When I try to start up a websphere portal server, it hangs at the line :
Server WebSphere_Portal open for e-business
and although it means that the server started up successfully, it is not...because in the progress bar, i stll see 'Starting.....' I have tried deleting the wstemp and temp directories but beyond that I am not sure what I can do to debug the problem.
The server with the same profile starts up great from another workspace, but when I come to this workspace, it just hangs at
Server WebSphere_Portal open for e-business
I am using RAD 7 and portal 6.1
Hello,
We have observed that there seems to be a maximum number of ids/variables which one can pass in the IN clause of SQL as comma seperated values. To avoid this we are storing all the ids in a table and doing a SELECT within the IN clause. This however means extra database operations to store and retrieve ids. Is there any other way to use IN without SELECT?
regards
Sameer
Hello, some one know how can I manipulate on some configuration over all projects in solution?
For example, I create new configuration "Releas64" that means: "No debug, 64 bit, all files goes to c:\binaries", but I need to go over all 30 projects in our solution for to set those settings for every project.
Is there some tool?
Thank you for ahead.
If I need to provide a DLL by using C++ or C# to somebody. How do I know if my code is managed or unmanaged code? If I use VC++6.0, that means unmanaged and if I use .Net Visual Studio 2005 or later it will be managed code?
In this article : http://publib.boulder.ibm.com/infocenter/macxhelp/v6v81/index.jsp?topic=/com.ibm.vacpp6m.doc/language/ref/clrc03defst.htm
What's means the sentence "In C, a structure member may be of any type except "function returning T" (for some type T)"
Thanks for all the answers!
Hi Everyone,
I have created an application in Compact Framework 2.0
This application is being used in many various counties and cultures.
My Issue is that any and all exceptions are logged, but they are appearing in the culture of the device, in some cases this means i am unable to read them.
Any help or suggestions will be appreciated
Thanks
Say you've got some IEnumerable called S of length N. I would like to select all continuous subsequences of length n <= N from S.
If S were, say, a string, this'd be pretty easy. There are (S.Length - n + 1) subsequences of length n. For example, "abcdefg" is length (7), so that means it has (5) substrings of length (3): "abc", "bcd", "cde", "def", "efg".
But S could be any IEnumerable, so this route isn't open. How do I use extension methods to solve this?
I Have dynamically render row. WE have fields like FROM TO.
For eg: From TO
2 10,
2 3,
8 12
It cannot accept this combination row.. That means no number should be overlapping.
For eg: From TO
2 10,
0 1,
11 12
This combination is allowed.the row may also increased.
I need need to write a validation for this overlapping.
Can any 1 help to solve this problem.
I've heard this term used, but I'm not entirely sure what it means, so:
What DOES it mean and what DOESN'T it mean?
What are some examples of what IS and ISN'T microbenchmarking?
What are the dangers of microbenchmarking and how do you avoid it?
(or is it a good thing?)
Hi everyone,
is there in any means a manner to show a grid or something like Excel. I see alot of information, but how do you feel about this one?
Are there grids, or third party grid that provide these features?
Thanks, I very like it to here your opinion, and your idea about this feature I want to provide in a Web Page?
I know that in community server which means that you can't use Sessions, and few years ago i remember i was working on a website where we were not allowed to use sessions.
In my point of view sessions are a very helpful tool if we managed how to use the right way, but is using session variable in a website is something bad, when its bad and when its not?
Is there any field/option/anything that I can put in a TCP packet (be it a syn or an ack or just plain data) that I can be sure will be returned by the other end intact?
For eg. I want to "tag" a particular connection (src, srcport, dst, dstport) with a number that I can always read from a packet belonging to that connection. That means I can identify the connection without using the 4-tuple (as given above).