The Way to Programming
The Way to Programming
ActiveSheet.AutoFilterMode = 0 ActiveSheet.Range("A1:G20000").AutoFilter Field:=3, Criteria1:=Array("9484098260", "9480008267"), Operator:=xlFilterValues Range("A1:F20000").SpecialCells(xlCellTypeVisible).Copy
I agree it does not make sense to put a word which looks like the name of a person as a Favorite Color of the next person, but this is the logic I need to implement. To put it another way, if this was the list of integers – 1, 2, 3, 4, 5, 6, 7, 8, 9 then our persons will like 1 2, 2 3, 3 4, 4 5, 5 6 and so on.
Leaving out the condition does not make any difference to the output. I am still getting the same list of person that the version of the code with the condition did.
Perhaps what we can do is in each run of the loop we remove the first item from the list and pass the cut down version (one word less than previously) of the list through our function, then it may give the result I need, though I do not know how to do it.
Try this sample, please let me know if something is not clear
std::ifstream ifs ("test.txt", std::ifstream::in);//Read the file in input mode string eachline; while(getline(ifs,eachline)){//Read each line into a string if(!ifs.good())//if it (file state) is no more valid break and close the file break; stringstream txtStream(eachline);//Insert the string to string stream for further processing txtStream.ignore(eachline.length(),':');// Ignore the T1: part since we are not interested in it std::string token;//to contain each element that we are interested in while(std::getline(txtStream, token, ',')) {//Get elements seperated by comma into the token variable. std::cout << token << ',';// This token might still contain white spaces //You can read this token and insert into your vector } std::cout << endl;//Insert new line } ifs.close();//Close the file stream handle
i believe you can also add a ‘Web.config’ in a particular folder of your app. Scripts in that folder then run as the impersonated user
i have a folder named ‘netw’ in which i have ashx and aspx files that access an internal file share, not normally available to the asp pool identity
If high performance is an issue, then you would want to improve on this.
#include#include #include #include #include string change2(string time24Hour) { char buf[3]; int hh = atoi(time24Hour.c_str()); string suffix = hh > 11 ? "PM" : "AM"; hh = hh > 12 ? hh - 12 : hh; sprintf(buf, "%02d", hh); return string(buf) + time24Hour.substr(2, string::npos) + " " + suffix; }
Create a specific user for SQL Server in the Users manager for NT 4.0.Give the ID login as service rights. When installing SQL Server, tell the installation program to use this login and password. Be careful, this ID and password is case sensitive
Unless you are dynamically building a query (such as when the user select fields and conditions), or are stuck with a DBA that prevents you from doing so, a stored procedure is always a better choice, for many reasons, including maintenance (as hinted in Jim answer), performance (compiled SQL is faster) and security.
Also, on the Mac the standard command line compiler is Clang, which is a GCC compatible compiler. You can get this by installing xCode and the command line tools. You can also install GCC, which you choose is up to you as they both (more or less) behave the same (since Clang is designed to be compatible with GCC).
>> How do we feel about mingw-w64, rather than MinGW?
At this stage in his development (pardon the pun) I really wouldn’t get too hung up over the architecture. For the type of code he’ll be writing he really won’t need to know nor care whether it’s a 32 bit or 64 bit compiler. This is super advanced stuff and is highly unlikely to even be covered in his course.
Gcc https://gcc.gnu.org
The Windows version is called MinGW http://www.mingw.org
Gcc is the defecto compiler, which is installed by default in Linux. It’s available on nearly every platform.
A couple of thoughts come to mind….
Are you sure that the buffer is longer than the data? It could be a simple buffer overrun.
Do you need to flush the output file? It’s possible that the 3rd party I/O package can’t handle that much data that fast.
If log_3rd_party does not allow to pass a length, so we may need to copy to a temporary buffer.
unsigned int written = 0; char buf[92]; for (written = 0; i < packet_size - packet_size % 90; written += 90) { // write 90 bytes memcpy(buf,packet_buffer + written, 90); // could also use 'snprintf()', won't terminate iether buf[91] = '\0'; // zero-terminate buffer log_3rd_party(buf); } // log the remainder unsigned remainder = packet_size % 90; memcpy(buf,packet_buffer + written, remainder); // could also use 'snprintf()', won't terminate iether buf[ remainder + 1] = '\0'; // zero-terminate buffer log_3rd_party(buf);
Hangfire – Background jobs and workers for ASP.NET (just played with it, didnt make it into final product)
http://hangfire.io/
The king though, for scheduling in my world has been Quartz.NET (
Quartz.NET – Quartz Enterprise Scheduler .NET – http://www.quartz-scheduler.net/)
. We have all sorts of custom jobs (report delivery, database maintenance, application maintenance, daily SMS notifications, and all) running off cron triggers inside a Quartz.NET container.
One easy method I use to find out which site is being slammed (if that is the case), and I’ll assume your log files are in
/var/log/httpd
cd into your web log directly, and do an
ls -ltra
This will list everything in by modification time, and you can see which log is being written to continually.
(drop the -r if you would rather have the newest at top. I prefer bottom)
You can also do a
watch “ls -ltra”
to watch the list with a default 2 second update.
Then tail that puppy with a -f ollow to watch what and how the culprit his hitting it –
tail web-log-to-watch-access.log -f
Just look at the official documentation for List. The documentation often tells you more than what you read here and there, and you can usually count on it to be right. The Internet is full of false statements about everything.
Look at the Syntax portion of the documentation page, and you will see that List implements IEnumerable
If you still do not believe me, simply try a foreach on your class. Even without data in it, you will see that the syntax does not generate an error. It would give you an error just as your initial class if it did not implement GetEnumerator.
But change something in your last code. Because you inherits from List, your class is a List. You do not need to an internal list, you do not need to add anything:
public class DataExtractTablesColl : List{ }
You would add something if you wanted special constructors, supplementary methods and properties, or change the way some of the properties and methods work. Otherwise, inheriting from a class usually automatically gives you all its features. That is the first aim of inheritance.
I would use which ever you can use right now. If there is a learning curve for angular and not for JQuery, I would use JQuery. There are plug ins for just about everything you would want, if you use 1.x works with older ie if you want lighter weight use 2.x.
With JQuery UI you can certainly recreate any drag and drop function.
I would also suggest using http://getboostrap.com
for your core layout because it is a responsive grid.
I have used both and and there is a good learning curve for angular and personally I was not keen on how everything had to be an app. The js library I am diving into next is react https://facebook.github.io/react/
and I am determined to make a sample app built to run on parse.
Sign in to your account