Daily Archives

Articles indexed Wednesday December 29 2010

Page 11/33 | < Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >

  • Hyperlinks in Windows Update window not working?!

    - by w3d
    The actual links in the Windows Update window to open the relevant knowledge base article have stopped working. They still look like links, but they just don't do anything anymore?! This started happening (or not happening!) during the last Windows Update (around 2010-10-23). At the time I believe the first link worked OK and all subsequent links did not!? In the recent Windows Update (today) no links work. I can copy and paste the text of the link into the browser and OK. Web-like links from all other applications work OK. Dec 2010 - Windows Update links still do not work. I guess this must be something specific to my machine as I've not seen it reported anywhere else?!

    Read the article

  • Computers displaying an unwanted password change prompt

    - by evesirim
    We run a small network of users from a central SBS 2008 server that handles group policy & AD. Most of our users operate under a policy that propts them for a password change every 6 months as a security measure, with a few administrator accounts & terminal machines not using the policy for the sake of ease as they are needed all the time. Recently all machines regardless of policy have started asking for a password change out of schedule. Some PCs run Windows 7 & some XP, though the password prompts don't seem to discriminate between OS. What could this be down to? Many thanks

    Read the article

  • prevent use of 'net user' command to change passwords on windows vista / xp

    - by guest
    hello the point is, if i'm logged in (and as almost every windows user, i've got an admin-account), and someone comes across my not locked pc, it is possible to change my password the pro-way through using: net user Admin %NEW_PASSWD% what can i do to prevent that, besides not being logged in as admin. i once saw a way, where the 'net user' command was substituted by a .bat file. so if you call 'net user Admin ...', it runs this .bat-file instead, which locks the notebook immediately. problem is, i honestly don't know how i could let windows substitute eg net.exe with a .bat-file. (too little windows knowledge) do you know any way how to do it? i'd appreciate it.

    Read the article

  • How to remove "com.starfield.backupservice" from launchd?

    - by user556623
    I remember sometime ago, I uninstall an application called starfield, but probably I didn't do a clean uninstall. Now in Console, I always see a annoying message: com.apple.launchd[1] (com.starfield.backupservice[4441]) Exited with exit code: 1 com.apple.launchd[1] (com.starfield.backupservice) Throttling respawn: Will start in 10 seconds com.apple.launchd[1] (com.starfield.backupservice[4442]) posix_spawn("/Applications/Starfield/BackupService/offSyncService", ...): No such file or directory I know it could be something wrong with my installation, how can I do a clean uninstall now, or just fix this issue, I don't want to see this message from my console any more. Thanks.

    Read the article

  • Linking to lua libraries w/ codeblocks on linux

    - by person
    After I downloaded the source for lua, I followed the install instructions, doing... make linux install make generic install I've also done the make test and it passes, printing out Hello World, from Lua 5.1. However, I can't link to the lua libraries in CodeBlocks. I know where lualib.a is (usr/local/lib) which I set in my Search Directories for the linker. I still get error messages like... undefined reference to lua_isstring Am I missing something critical here? P.S. I had this running on Windows via Visual Studio.

    Read the article

  • R in a Nutshell de Joseph Adler, critique par ced

    Bonjour, La rédaction de DVP a lu pour vous l'ouvrage suivant: R in a Nutshell, de Joseph Adler. paru aux éditions O'Reilly. [IMG]http://covers.oreilly.com/images/9780596801717/lrg.jpg[/IMG] Citation: R is rapidly becoming the standard for developing statistical software, and R in a Nutshell provides a quick and practical way to learn this increasingly popular open source language and environment. You'll not only learn how to program in R, but al...

    Read the article

  • How do I know if my system is capable of playing 24bit/96kHz sound?

    - by Igor Zinov'yev
    Let me state for the record that I'm a total noob when it comes to Hi-Fi sound systems, but I am rather picky about the sound quality. Normally I listen to CD recordings ripped to FLAC in 16/44, but I have several albums that are also ripped from vinyls to FLAC in 24/96. But it seems that I can't tell the difference between 16-bit and 24-bit versions (except for some vinyl noises, of course). That can be due to several reasons: my equipment (onboard audio, monitor headphones) isn't good enough to make any difference, my system is not playing audio in 24-bit 96 kHz, I am physically unable to hear the difference. So here is my question, how do I tell if my system can play 24-bit sound with 96 or 192 kHz resolution? And if it can, how do I tell that it plays it instead of downsampling to 16-bit / 44 kHz? Also, what hardware (audio cards, amplifiers, etc.) would you recommend to play such recordings on Ubuntu?

    Read the article

  • Can't get my Blue Snowflake Mic to work

    - by TheNerdAL
    It was working fine when I bought it. I think it was an update or something that made it stop. I don't think the Mic is broken, at least I hope not. Can anyone help? Please? I need it before tommorrow. I'm working on a video. I get this when I check the terminal for what USB devices are connected: Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 003 Device 004: ID 2525:8912 Bus 003 Device 003: ID 058f:9360 Alcor Micro Corp. 8-in-1 Media Card Reader Bus 003 Device 002: ID 056a:00d2 Wacom Co., Ltd Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Thanks.

    Read the article

  • How to efficiently implement a strategy pattern with spring ?

    - by Anth0
    I have a web application developped in J2EE 1.5 with Spring framework. Application contains "dashboards" which are simple pages where a bunch of information are regrouped and where user can modify some status. Managers want me to add a logging system in database for three of theses dashboards. Each dashboard has different information but the log should be traced by date and user's login. What I'd like to do is to implement the Strategy pattern kind of like this : interface DashboardLog { void createLog(String login, Date now); } // Implementation for one dashboard class PrintDashboardLog implements DashboardLog { Integer docId; String status; void createLog(String login, Date now){ // Some code } } class DashboardsManager { DashboardLog logger; String login; Date now; void createLog(){ logger.log(login,now); } } class UpdateDocAction{ DashboardsManager dbManager; void updateSomeField(){ // Some action // Now it's time to log dbManagers.setLogger = new PrintDashboardLog(docId, status); dbManagers.createLog(); } } Is it "correct" (good practice, performance, ...) to do it this way ? Is there a better way ? Note :I did not write basic stuff like constructors and getter/setter.

    Read the article

  • can someone help me with why my OnClickListener won't work? Android

    - by clayton33
    Is there something simple i might be missing? The "kruis" picture shows up on my ImageButton, so i'm pretty sure my main.xml is good, but when i click on the ImageButton, i get no Toast and testView does not change... been struggling for a few hours on this now, not sure what i'm doing wrong! package com.matchit; import android.app.Activity; import android.os.Bundle; import android.view.View; import android.view.View.OnClickListener; import android.widget.ImageButton; import android.widget.TextView; import android.widget.Toast; public class matchit extends Activity { OnClickListener cardListener; TextView testView; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); testView = (TextView)findViewById(R.id.test); ImageButton b1 = (ImageButton)findViewById(R.id.card1); b1.setImageResource(R.drawable.kruis); b1.setOnClickListener(cardListener); cardListener = new OnClickListener(){ @Override public void onClick(View v) { testView.setText("its working"); Toast.makeText(getApplicationContext(), "its working", Toast.LENGTH_LONG).show(); } }; } }

    Read the article

  • How can I parse a namespace using the SAX parser?

    - by Silvestri
    Hello, Using a twitter search URL ie. http://search.twitter.com/search.rss?q=android returns CSS that has an item that looks like: <item> <title>@UberTwiter still waiting for @ubertwitter android app!!!</title> <link>http://twitter.com/meals69/statuses/21158076391</link> <description>still waiting for an app!!!</description> <pubDate>Sat, 14 Aug 2010 15:33:44 +0000</pubDate> <guid>http://twitter.com/meals69/statuses/21158076391</guid> <author>Some Twitter User</author> <media:content type="image/jpg" height="48" width="48" url="http://a1.twimg.com/profile_images/756343289/me2_normal.jpg"/> <google:image_link>http://a1.twimg.com/profile_images/756343289/me2_normal.jpg</google:image_link> <twitter:metadata> <twitter:result_type>recent</twitter:result_type> </twitter:metadata> </item> Pretty simple. My code parses out everything (title, link, description, pubDate, etc.) without any problems. However, I'm getting null on: <google:image_link> I'm using Java to parse the RSS feed. Do I have to handle compound localnames differently than I would a more simple localname? This is the bit of code that parses out Link, Description, pubDate, etc: @Override public void endElement(String uri, String localName, String name) throws SAXException { super.endElement(uri, localName, name); if (this.currentMessage != null){ if (localName.equalsIgnoreCase(TITLE)){ currentMessage.setTitle(builder.toString()); } else if (localName.equalsIgnoreCase(LINK)){ currentMessage.setLink(builder.toString()); } else if (localName.equalsIgnoreCase(DESCRIPTION)){ currentMessage.setDescription(builder.toString()); } else if (localName.equalsIgnoreCase(PUB_DATE)){ currentMessage.setDate(builder.toString()); } else if (localName.equalsIgnoreCase(GUID)){ currentMessage.setGuid(builder.toString()); } else if (uri.equalsIgnoreCase(AVATAR)){ currentMessage.setAvatar(builder.toString()); } else if (localName.equalsIgnoreCase(ITEM)){ messages.add(currentMessage); } builder.setLength(0); } } startDocument looks like: @Override public void startDocument() throws SAXException { super.startDocument(); messages = new ArrayList<Message>(); builder = new StringBuilder(); } startElement looks like: @Override public void startElement(String uri, String localName, String name, Attributes attributes) throws SAXException { super.startElement(uri, localName, name, attributes); if (localName.equalsIgnoreCase(ITEM)){ this.currentMessage = new Message(); } } Tony

    Read the article

  • List<T> and IEnumerable difference

    - by Jonas Elfström
    While implementing this generic merge sort, as a kind of Code Kata, I stumbled on a difference between IEnumerable and List that I need help to figure out. Here's the MergeSort public class MergeSort<T> { public IEnumerable<T> Sort(IEnumerable<T> arr) { if (arr.Count() <= 1) return arr; int middle = arr.Count() / 2; var left = arr.Take(middle).ToList(); var right = arr.Skip(middle).ToList(); return Merge(Sort(left), Sort(right)); } private static IEnumerable<T> Merge(IEnumerable<T> left, IEnumerable<T> right) { var arrSorted = new List<T>(); while (left.Count() > 0 && right.Count() > 0) { if (Comparer<T>.Default.Compare(left.First(), right.First()) < 0) { arrSorted.Add(left.First()); left=left.Skip(1); } else { arrSorted.Add(right.First()); right=right.Skip(1); } } return arrSorted.Concat(left).Concat(right); } } If I remove the .ToList() on the left and right variables it fails to sort correctly. Do you see why? Example var ints = new List<int> { 5, 8, 2, 1, 7 }; var mergeSortInt = new MergeSort<int>(); var sortedInts = mergeSortInt.Sort(ints); With .ToList() [0]: 1 [1]: 2 [2]: 5 [3]: 7 [4]: 8 Without .ToList() [0]: 1 [1]: 2 [2]: 5 [3]: 7 [4]: 2 Edit It was my stupid test that got me. I tested it like this: var sortedInts = mergeSortInt.Sort(ints); ints.Sort(); if (Enumerable.SequenceEqual(ints, sortedInts)) Console.WriteLine("ints sorts ok"); just changing the first row to var sortedInts = mergeSortInt.Sort(ints).ToList(); removes the problem (and the lazy evaluation). EDIT 2010-12-29 I thought I would figure out just how the lazy evaluation messes things up here but I just don't get it. Remove the .ToList() in the Sort method above like this var left = arr.Take(middle); var right = arr.Skip(middle); then try this var ints = new List<int> { 5, 8, 2 }; var mergeSortInt = new MergeSort<int>(); var sortedInts = mergeSortInt.Sort(ints); ints.Sort(); if (Enumerable.SequenceEqual(ints, sortedInts)) Console.WriteLine("ints sorts ok"); When debugging You can see that before ints.Sort() a sortedInts.ToList() returns [0]: 2 [1]: 5 [2]: 8 but after ints.Sort() it returns [0]: 2 [1]: 5 [2]: 5 What is really happening here?

    Read the article

  • Binding for MinWidth property does not work in Silverlight

    - by Akash Kava
    I have noticed something very unusual today, I need to bind "MinWidth" property of TextBlock to some value, however following example does not work. It only accepts MinWidth at a time of creation, but after that it is not affected at all if LeftWidth property is changed at runtime, however if I bind LeftWidth property to WidthProperty it works well. Binding b = new Binding("LeftWidth"); // following never changes layout of control tb.SetBinding(TextBlock.MinWidthProperty,b); However, this one works correctly, // following never changes layout of control tb.SetBinding(TextBlock.WidthProperty,b); Now I also did hook events and tried to do InvalidateMeasure and InvalidateArrange on TextBlock, but it has no effect. Seems like Changing MinWidth Property after layout pass does not work at all. Can it be a bug in Silverlight? or Does anyone have any idea at all why MinWidth does not redo the layout?

    Read the article

  • How to remove the auto added column (HeaderRole=Padding) in WPF GridView

    - by dnr3
    Hi, I'm trying to make a custom gridview in WPF but I just realized that as this link says: The GridViewHeaderRowPresenter class performs layout for the column headers in a GridView and places an additional column header at the end to add space and because of the additional column header at the end, there's an extra column to the right of the last column. so I was wondering if I can modify it, please refer to this image below My questions are: Is there anyway I can remove the 'A' part from the grid? Is there anyway I can add the same effect of 'B' part (the role = padding header) to the 'C' Part (before the first column)? Thanks

    Read the article

  • Error #2032 displayed in html page

    - by Rajeev
    I have a app which is used to testmicrophone.But when include in html page it displays Error #2032.How to resolve this. This is the HTML code <div style="display: inline;float:center;"> <object width="100" height="100"> <embed src="mic.swf" width="250" height="250"> </embed> </object> </div>

    Read the article

  • Waiting for ServerSocket accept() to put socket into "listen" mode

    - by inazaruk
    I need a simple client-server communication in order to implement unit-test. My steps: Create server thread Wait for server thread to put server socket into listen mode ( serverSocket.accept() ) Create client Make some request, verify responses Basically, I have a problem with step #2. I can't find a way to signal me when server socket is put to "listen" state. An asynchronous call to "accept" will do in this case, but java doesn't support this (it seems to support only asynchronous channels and those are incompatible with "accept()" method according to documentation). Of cause I can put a simple "sleep", but that is not really a solution for production code. So, to summarize, I need to detect when ServerSocket has been put into listen mode without using sleeps and/or polling.

    Read the article

  • Strange behavior while returning csv file from spring controller

    - by Fanooos
    I working in a spring application which have an action method that returns a CSV file. This action works fine but in some cases it throws a predefined exception (MyAppException). I have another method that is annotated @ExceptionHandler(MyAppException.class) In the exception handler method I return another csv file but with different contents. The code that returns the csv file is almost the same in the two methods. List<String[]> list= new ArrayList<String[]>(); list.add(new String[]{ integrationRequestErrorLog.getErrorMessage(), Long.toString(integrationRequestErrorLog.getId()), Integer.toString(integrationRequestErrorLog.getErrorCode()) }); CSVWriter writer = new CSVWriter(response.getWriter(), ','); writer.writeAll(list); writer.close(); the difference between the two method is the list of contents. In the first method the file is returned normally while in the exception handler method I have a strange behavior. The exception handler method works fine with Opera browser while it gives me a 404 with FireFox. Opera browser give me 404 also but it download the file while firefox does not? Really I do not understand what is the difference here.

    Read the article

  • multi-valued property query in GAE

    - by Tim
    class Person{ @Persistent private List tags = ArrayList() } I want to let the user query a person based on his/her tag, so I had my query filter like this: tags.contains(tagValue1) and if the user want to search for multiple tags, I would just add to the filter so if the user is searching for 3 tags, then the query would be tags.contains(tagValue1) && tags.contains(tagValue2) && tags.contains(tagValue3) I think this approach is wrong, because the datastore then needs to have an index that have the tags property three times... and if the user search for more than 3 tags at a time then it will be broken. What's the proper way to do this? Do you guys have any suggestions?

    Read the article

  • android: problem sending mail, SuperNotCalledException thrown

    - by MobileDev123
    Hi, While sending mail from a button's click my device shows an error. Which throws SuperNotCalledException in logcat I am posting the code and the logcat output here. Code Intent emailIntent = new Intent( android.content.Intent.ACTION_SEND); emailIntent.setType("text/plain"); String recosubject = getString(R.string.recoSub); emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, "" + recosubject); emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, "" + reco); startActivity(Intent.createChooser(intent, "Send mail...")); And here is the logcat output Uncaught handler: thread main exiting due to uncaught exception 12-29 15:29:14.488: ERROR/AndroidRuntime(6823): android.app.SuperNotCalledException: Activity {android/com.android.internal.app.ChooserActivity} did not call through to super.onCreate() 12-29 15:29:14.488: ERROR/AndroidRuntime(6823): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2461) 12-29 15:29:14.488: ERROR/AndroidRuntime(6823): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2512) 12-29 15:29:14.488: ERROR/AndroidRuntime(6823): at android.app.ActivityThread.access$2200(ActivityThread.java:119) 12-29 15:29:14.488: ERROR/AndroidRuntime(6823): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1863) 12-29 15:29:14.488: ERROR/AndroidRuntime(6823): at android.os.Handler.dispatchMessage(Handler.java:99) 12-29 15:29:14.488: ERROR/AndroidRuntime(6823): at android.os.Looper.loop(Looper.java:123) 12-29 15:29:14.488: ERROR/AndroidRuntime(6823): at android.app.ActivityThread.main(ActivityThread.java:4367) 12-29 15:29:14.488: ERROR/AndroidRuntime(6823): at java.lang.reflect.Method.invokeNative(Native Method) 12-29 15:29:14.488: ERROR/AndroidRuntime(6823): at java.lang.reflect.Method.invoke(Method.java:521) 12-29 15:29:14.488: ERROR/AndroidRuntime(6823): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860) 12-29 15:29:14.488: ERROR/AndroidRuntime(6823): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618) 12-29 15:29:14.488: ERROR/AndroidRuntime(6823): at dalvik.system.NativeStart.main(Native Method) Can anybody tell what is going wrong in this code?

    Read the article

  • How do I Insert Record MVVM through WCF

    - by DG KOL
    Hello, I’m new in MVVM Pattern (Using Galasoft MVVM Light toolkit). I’ve created a Test Project where I want to fetch some records from Database through WCF. This is working fine but I’ve failed to insert new record from View; Here is My Code: Database Table Name: TestUser (First Name, LastName) WCF (NWCustomer) Two Methods Public List<TestUser> GetAllUsers() [“LINQ2SQL Operation”] Public bool AddUser(TestUser testuser) Public bool AddUser(TestUser testuser) { try { using (DBDataContext db = new DBDataContext()) { TestUser test = new TestUser() { FirstName = testuser.FirstName, LastName = testuser.LastName }; db.TestUser.InsertOnSubmit(test); db.SubmitChanges(); } } catch (Exception ex) { return false; } return true; } Silverlight Project MODEL consists ITestUserService.cs TestUserService.cs public void AddTestTable(TestTableViewModel testuser, Action<bool> callback) { NWCustomerClient client = new NWCustomerClient("BasicHttpBinding_NWCustomer"); client.AddTestUserCompleted += (s, e) => { var userCallback = e.UserState as Action<bool>; if (userCallback == null) { return; } if (e.Error == null) { userCallback(e.Result); return; } userCallback(false); }; client.AddTestUserAsync(testuser.Model); } VIEWMODEL TestUserViewModel public TestUser User { get; private set; } public const string DirtyVisibilityPropertyName = "DirtyVisibility"; private Visibility _dirty = Visibility.Collapsed; public Visibility DirtyVisibility { get { return _dirty; } set { if (_dirty == value) { return; } _dirty = value; RaisePropertyChanged(DirtyVisibilityPropertyName); } } public TestUserViewModel (TestUser user) { User = user; user.PropertyChanged += (s, e) => { DirtyVisibility = Visibility.Visible; }; } MainViewModel public ObservableCollection<TestUserViewModel> TestTables { get; private set; } public const string ErrorMessagePropertyName = "ErrorMessage"; private string _errorMessage = string.Empty; public string ErrorMessage { get { return _errorMessage; } set { if (_errorMessage == value) { return; } _errorMessage = value; RaisePropertyChanged(ErrorMessagePropertyName); } } private ITestUserService _service; public RelayCommand< TestUserViewModel> AddTestUserRecord { get; private set; } public MainTestTableViewModel (ICustomerService service) { _service = service; TestTables = new ObservableCollection<TestTableViewModel>(); service.GetAllTestTable(HandleResult); } private void HandleResult(IEnumerable<TestTable> result, Exception ex) { TestTables.Clear(); if (ex != null) { //Error return; } if (result == null) { return; } foreach (var test in result) { var table = new TestTableViewModel(test); TestTables.Add(table); } } XAML <Grid x:Name="LayoutRoot"> <StackPanel> <TextBox Text="FirstName" /> <TextBox Text="LastName" /> <Button Content="Add Record" Command="{Binding AddTestUserRecord}" /> </StackPanel> </Grid> I want to add records into TestTable (Database Table). How do I insert record? In XAML two text box and a button control is present. Thanking you. DG

    Read the article

  • How to fix - Parse error: syntax error, unexpected T_CLASS

    - by user557015
    Hi, I'm new to PHP, and i'm making a forum. all the files work except one file, add_topic.php. It gives me an error saying: Parse error: syntax error, unexpected T_CLASS in /home/a3885465/public_html/add_topic.php on line 25 I know it is probably on the lines: </span>}<span class="s4"><br> </span>else{<span class="s4"><br> </span>echo "ERROR";<span class="s4"><br> </span>}<span class="s4"><br> </span>mysql_close();<span class="s4"><br> but the whole code is below just in case. If you have any idea, it would be really appreciated, thanks! The Code for add_topic.php <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="Content-Style-Type" content="text/css"> <title></title> <meta name="Generator" content="Cocoa HTML Writer"> <meta name="CocoaVersion" content="1038.32"> <style type="text/css"> p.p1 {margin: 0.0px 0.0px 12.0px 0.0px; font: 12.0px Verdana; color: #009901} p.p2 {margin: 0.0px 0.0px 12.0px 0.0px; font: 12.0px Verdana; color: #3a00ff} span.s1 {color: #3a00ff} span.s2 {font: 12.0px 'Lucida Grande'; color: #3a00ff} span.s3 {font: 13.0px Courier; color: #404040} span.s4 {font: 12.0px 'Lucida Grande'} span.s5 {color: #009901} td.td1 {width: 566.0px; margin: 0.5px 0.5px 0.5px 0.5px} </style> </head> <body> <table cellspacing="0" cellpadding="0"> <tbody> <tr> <td valign="middle" class="td1"> <p class="p1"><span class="s1"></span><?php<span class="s2"><br> </span><span class="s1">$host="</span><span class="s3">"host"</span><span class="s1">";</span> // Host name <span class="s4"><br> </span><span class="s1">$username="</span><span class="s3">username</span><span class="s1">";</span> // Mysql username <span class="s4"><br> </span><span class="s1">$password="password";</span> // Mysql password <span class="s4"><br> </span><span class="s1">$db_name="</span><span class="s3">database_name</span><span class="s1">";</span> // Database name <span class="s4"><br> </span><span class="s1">$tbl_name="forum_question";</span> // Table name</p> <p class="p2"><span class="s5">// Connect to server and select database.</span><span class="s4"><br> </span>mysql_connect("$host", "$username", "$password")or die("cannot connect"); <span class="s4"><br> </span>mysql_select_db("$db_name")or die("cannot select DB");</p> <p class="p2"><span class="s5">// get data that sent from form </span><span class="s4"><br> </span>$topic=$_POST['topic'];<span class="s4"><br> </span>$detail=$_POST['detail'];<span class="s4"><br> </span>$name=$_POST['name'];<span class="s4"><br> </span>$email=$_POST['email'];<span class="s4"><br> <br> </span>$datetime=date("d/m/y h:i:s"); <span class="s5">//create date time</span><span class="s4"><br> <br> </span>$sql="INSERT INTO $tbl_name(topic, detail, name, email, datetime)VALUES('$topic', '$detail', '$name', '$email', '$datetime')";<span class="s4"><br> </span>$result=mysql_query($sql);<span class="s4"><br> <br> </span>if($result){<span class="s4"><br> </span>echo "Successful<BR>";<span class="s4"><br> </span>echo "<a href=main_forum.php>View your topic</a>";<span class="s4"><br> </span>}<span class="s4"><br> </span>else{<span class="s4"><br> </span>echo "ERROR";<span class="s4"><br> </span>}<span class="s4"><br> </span>mysql_close();<span class="s4"><br> </span>?></p> </td> </tr> </tbody> </table> </body> </html> Thanks again!

    Read the article

  • perl regex escape characters

    - by freshWoWer
    I have heard perl is a good language at doing regex but i am a bit confused at the characters that requires escaping I tested the code on http://regexlib.com/RETester.aspx and got the result I want //home/dev/abc/code/hello/world.cpp#1 //home/dev/((.*?)/[^/]+).*# Match $1 $2 //home/dev/abc/code/hello/world.cpp# abc/code abc However, I am not quite sure how do i translate this to perl code I tried, \/\/home\/dev\/\(\(\.\*\?\)\/\[\^\/\]\+\)\.\*\# and \/\/home\/dev\/((.*?)\/[^\/]+).*\# and both failed Don't you think the escaping makes the regex very unreadable? Am i using something wrong?

    Read the article

  • Regex take too long to match the result

    - by Joe Ijam
    Hi all I have this regex pattern <(\d+)>(\d+\.\d+|\d{4}\-\d+\-\d+\s+\d{2}:\d{2}:\d{2})(?:\..*?)*\s+(ALER|NOTI) and this is my input (will not matched at all) <150>2010-12-29 18:11:30.883 -0700 192.168.2.145 80 192.168.2.87 2795 "-" "-" GET HTTP 192.168.2.145 HTTP/1.1 200 36200 0 1038 544 192.168.2.221 80 540 SERVER DEFAULT PASSIVE VALID /joomla/ "-" http://192.168.2.145/joomla/index.php?option=com_content&view=a be4d44e8f3986183a87991398c1c212e=1; be4d44e8f3986183a87991398c1c212e=1 This will return not matched result but it takes too long to output the result. Since i have a thousand of logs/inputs in a second, it should finish very fast for every single log/input. Sometime it reaches CPU 100%. Can anyone help me to solve this regex problem? Thanks

    Read the article

  • jQuery $.ajax calls success handler when reuqest fails because of browser reloading

    - by Martin
    I have the following code: $.ajax({ type: "POST", url: url, data: sendable, dataType: "json", success: function(data) { if(customprocessfunc) customprocessfunc(data); }, error: function(XMLHttpRequest, textStatus, errorThrown){ // error handler here } }); I have a timer which makes AJAX requests often. If I do not receive anything in 'data', I show an error message to the user - it means, something wnet bad on the server. The problem is when user reloads the page while the AJAX call is in progress. I can see in the firebug that the AJAX call fails (URL is colored red and no HTTP status is displayed) so I expect that jQuery will stop the reuqest or at least go to the error handler. But it goes to the success handler and passes null in the 'data' variable. As a result, when user reloads the page, sometimes he can see my big red message about unknown error (because data is null). Is there any way to make jQuery abort the request on complete reloading all at least not to call my success function? I have no way to know in the success handler why the data is null - did it came empty from the server or the call was aborted because of reload.

    Read the article

  • Crystal Report with Error : A number range is required here.

    - by gofor.net
    Hi Everyone, I am using the crystal report, in that i am using code like below to show the SQL data into the crystal report, string req = "{View_EODPumpTest.ROId} IN " + str + " AND " + "({View_EODPumpTest.RecordCreatedDate}>=date(" + fromDate.Year + " , " + fromDate.Month + " , " + fromDate.Day + ")" + "AND" + "{View_EODPumpTest.RecordCreatedDate}<=date(" + toDate.Year + " , " + toDate.Month + " ," + toDate.Day + " ))"; ReportDocument rep = new ReportDocument(); rep.Load(Server.MapPath("PumpTestReport.rpt")); DateTime fromDate = DateTime.Parse(Request.QueryString["fDate"].ToString()); DateTime toDate = DateTime.Parse(Request.QueryString["tDate"].ToString()); CrystalReportViewer_PumpTest.ReportSource = rep; //CrystalReportViewer1.SelectionFormula = str; rep.RecordSelectionFormula = str; CrystalDecisions.CrystalReports.Engine.TextObject from = ((CrystalDecisions.CrystalReports.Engine.TextObject)rep.ReportDefinition.ReportObjects["txtFrom"]); from.Text = fromDate.ToShortDateString(); CrystalDecisions.CrystalReports.Engine.TextObject to = ((CrystalDecisions.CrystalReports.Engine.TextObject)rep.ReportDefinition.ReportObjects["txtTO"]); to.Text = toDate.ToShortDateString(); //Session["Repo"] = rep; CrystalReportViewer_PumpTest.RefreshReport(); after running my application it executes fine with no exception but such error i am getting, A number range is required here. Error in File C:\DOCUME~1\Delmon\LOCALS~1\Temp\PumpTestReport {14E557A7-51B3-4791-9C78-B6FBAFFBD87C}.rpt: Error in formula . '{View_EODPumpTest.ROId} IN ['15739410','13465410'] AND ({View_EODPumpTest.RecordCreatedDate}>=date(2010 , 12 , 1)AND{View_EODPumpTest.RecordCreatedDate}<=date(2010 , 12 ,25 ))' A number range is required here. error. what i will do for this? Please help, Thanks in advance

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >