[Solved] How can i extract the info between ” ” ? C#

[ad_1] Try this demo, put it in a Main method of a console application (it uses Regex so you have to add line “using System.Text.RegularExpressions;”): string input = “AT+CMGL=\”ALL\”\n+CMGL: 0,\”REC READ\”,\”+40728072005\”,,\”12/06/29,13:04:26+12\”\npassword,1,ON”; var matches = Regex.Matches( input, @”\””(?<msisdn>\+\d*)\””,.*,\””(?<date>\d{2}\/\d{2}/\d{2},\d{2}:\d{2}:\d{2}\+\d{2})\””.*\n+(?<passwd>[^,]*),(?<itemno>\d*),(?<command>\w*)” , RegexOptions.Multiline); foreach (Match m in matches) { Console.WriteLine(m.Groups[“msisdn”].Value); Console.WriteLine(m.Groups[“date”].Value); Console.WriteLine(m.Groups[“passwd”].Value); Console.WriteLine(m.Groups[“itemno”].Value); Console.WriteLine(m.Groups[“command”].Value); } Console.ReadKey(); Basically, regular expression … Read more

[Solved] Get date for past weekday with Smarty

[ad_1] This is logic that you would normally put inside your PHP script, not smarty. Try something like this: empty($_GET[‘day’]) ? $day = date(‘l’) : $day = $_GET[‘day’]; $date = strtotime(“last {$day}”); echo “News from “.date(“l, F j”, $date); This script assumes that you pass the day as a GET parameter, for example index.php?day=monday. You … Read more

[Solved] How to encrypt header files in C [closed]

[ad_1] You can encrypt your source with any good encryption tool, of course.But obviously you can’t compile it anymore … But perhaps a library could help you. You can build a library which contains your GSM stuff. Then you and others can call the functions from the library, the only file you have to distribute, … Read more

[Solved] iPhone 4s looking simulator

[ad_1] Because of the extremely high pixel density of a retina display, creating a video with pixel-perfect retina graphics will require you to have a really big monitor. The is because monitors have far less pixel density than an retina display. The best way to accomplish your video is to use the non-retina simulator. If … Read more

[Solved] Which Visual Studio project types support Shift+Alt+D to open the Data Sources window?

[ad_1] I believe you are looking for this page: http://msdn.microsoft.com/en-us/library/yft2c9ad.aspx To quote msdn: “You can add a data source to a project only if it supports creating and working with data sources. For example, you can’t open the Data Sources window in a project for a Windows Store app.” Basically, if using a database seems … Read more

[Solved] most efficient way to write this sql query?

[ad_1] This is a little more difficult because MySQL doesn’t have Row_Number() so you’ll need to simulate it. One way is use a self join and a count. You could also use the @rownumber technique described here In my example I used animal_id to find the most recent but you may want to change the … Read more

[Solved] How to remove list view item in list view android?

[ad_1] Set View.GONE for View is not right way to remove row from ListView. to remove row remove select row item from Adapter data-source and call notify data change method of adapter to populate changes: close.setTag(position); close.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { int deletePos=Integer.parseInt(v.getTag().toString()); bpData.remove(deletePos); notifyDataSetChanged(); } }); 5 [ad_2] solved How … Read more

[Solved] What does “%.7le ” in printf means?

[ad_1] .7 is the precision and le means normal form. double x = 0.012345678910; printf(“%.7lf\n”, x); // 0.0123457 printf(“%.7le\n”, x); // 1.2345679e-02 printf(“%.9le\n”, x); // 1.234567891e-02 Edit See Eric Postpischil’s unswer below, it’s way more comprehensive than this one. 2 [ad_2] solved What does “%.7le ” in printf means?