Search Results

Search found 53 results on 3 pages for 'rohan'.

Page 1/3 | 1 2 3  | Next Page >

  • Can someone here explain constructors and destructors in python - simple explanation required - new

    - by rgolwalkar
    i will try to see if it makes sense :- class Person: '''Represnts a person ''' population = 0 def __init__(self,name): //some statements and population += 1 def __del__(self): //some statements and population -= 1 def sayHi(self): '''grettings from person''' print 'Hi My name is %s' % self.name def howMany(self): '''Prints the current population''' if Person.population == 1: print 'i am the only one here' else: print 'There are still %d guyz left ' % Person.population rohan = Person('Rohan') rohan.sayHi() rohan.howMany() sanju = Person('Sanjivi') sanju.howMany() del rohan # am i doing this correctly --- ? i need to get an explanation for this del - destructor O/P:- Initializing person data ****************************************** Initializing Rohan ****************************************** Population now is: 1 Hi My name is Rohan i am the only one here Initializing person data ****************************************** Initializing Sanjivi ****************************************** Population now is: 2 In case Person dies: ****************************************** Sanjivi Bye Bye world there are still 1 people left i am the only one here In case Person dies: ****************************************** Rohan Bye Bye world i am the last person on earth Population now is: 0 If required i can paste the whole lesson as well --- learning from :- http://www.ibiblio.org/swaroopch/byteofpython/read/

    Read the article

  • How can I track down what part of pfsense is blocking website access?

    - by Chase Florell
    I've got a PFSense firewall/gateway on our network. Everything works great except for the fact that I cannot access one specific website. Pfsense is running the following packages Country Block LightSquid nmap notes squid squidGuard Strikeback I can access every single website I've ever tried aside from one that we need for business use (http://bridalnetwork.ca) here's the traceroute frodo:~ chase$ traceroute bridalnetwork.ca traceroute to bridalnetwork.ca (192.197.103.73), 64 hops max, 52 byte packets 1 rohan (192.168.5.1) 6.618 ms 1.662 ms 9.207 ms 2 * * * 3 * * rohan (192.168.5.1) 7.225 ms !H 4 rohan (192.168.5.1) 5.314 ms !H 5.701 ms !H 7.573 ms !H frodo:~ chase$ How can I figure out what the reason behind the blockage is? note: this has been tested on every computer on the network with the same results. ps: the pfsense box is 'rohan' (192.168.5.1) Here's what I get with Squid enabled and here's what I get with Squid disabled

    Read the article

  • SuSE always logs a user in TVM session

    - by rohan
    Hello all, I recently installed Suse Linux enterprise Desktop 11 on my box. I created an user and logged in first time into a GNOME session without any problems. Last time I logged in I selected the session as TWM and that got me into the T windows manager just fine. Now when I log out and try to log back into a GNOME session, it will still log me into the TVM session. I have tried restarting the box but that has not helped. However, when I remote log in to the machine it will let me got on the GNOME session just fine. I'm guessing this is probably a really simple fix, however I am a Linux newbie and doing a google search isn't yielding me what I'm looking for. Thanks in advance for your help, Rohan

    Read the article

  • SuSE always logs a user in TVM session

    - by rohan
    Hello all, Our sa recently installed Suse Linux enterprise Desktop 11 on my work box and I logged in first time into a GNOME session without any problems. Last time I logged in I selected the session as TWM and that got me into the T windows manager just fine. Now when I log out and try to log back into a GNOME session, it will still log me into the TVM session. I have tried restarting the box but that has not helped. Though when I remote log in to the machine it will let me get on the GNOME session just fine. I'm guessing this is probably a really simple fix, however I am a Linux newbie and doing a google search isn't yielding me what I'm looking for. My sa cant figure what is wrong either Thanks in advance for your help, Rohan

    Read the article

  • Using a member function with QScriptEngine::newFunction

    - by Rohan Prabhu
    Hey all, Let's take the case of a simple class: QScriptEngine engine; class MyClass { public: QScriptValue foo(QScriptContext*, QScriptEngine*); MyClass(); }; QScriptValue MyClass:foo(QScriptContext* context, QScriptEngine* eng) { //something } MyClass::MyClass() { QScriptValue self = engine.newFunction(this->foo, 0); .... } The above function gives me an error: no matching function for call to ‘QScriptEngine::newFunction(<unresolved overloaded function type>, int)’ I have tried using engine.newFunction(reinterpret_cast<FunctionSignature>(foo), 0); but this gives me an error which basically says that the compiler is not aware of a keyword called 'FunctionSignature'. Any help is appreciated. Thanks a lot. Regards, rohan

    Read the article

  • Sony VAIO with Insyde H2O EFI bios will not boot into GRUB EFI

    - by Rohan Dhruva
    I bought a new Sony Vaio S series laptop. It uses Insyde H2O BIOS EFI, and trying to install Linux on it is driving me crazy. root@kubuntu:~# parted /dev/sda print Model: ATA Hitachi HTS72756 (scsi) Disk /dev/sda: 640GB Sector size (logical/physical): 512B/4096B Partition Table: gpt Number Start End Size File system Name Flags 1 1049kB 274MB 273MB fat32 EFI system partition hidden 2 274MB 20.8GB 20.6GB ntfs Basic data partition hidden, diag 3 20.8GB 21.1GB 273MB fat32 EFI system partition boot 4 21.1GB 21.3GB 134MB Microsoft reserved partition msftres 5 21.3GB 342GB 320GB ntfs Basic data partition 6 342GB 358GB 16.1GB ext4 Basic data partition 7 358GB 374GB 16.1GB ntfs Basic data partition 8 374GB 640GB 266GB ntfs Basic data partition What is surprising is that there are 2 EFI system partitions on the disk. The sda2 partition is a 20gb recovery partition which loads windows with a basic recovery interface. This is accessible by pressing the "ASSIST" button as opposed to the normal power button. I presume that the sda1 EFI System Partition (ESP) loads into this recovery. The sda3 ESP has more fleshed out entries for Microsoft Windows, which actually goes into Windows 7 (as confirmed by bcdedit.exe on Windows). Ubuntu is installed on sda6, and while installation I chose sda3 as my boot partition. The installer correctly created a sda3/EFI/ubuntu/grubx64.efi application. The real problem: for the life of me, I can't set it to be the default! I tried creating a sda3/startup.nsh which called grubx64.efi, but it didn't help -- on rebooting, the system still boots into windows. I tried using efibootmgr, and that shows as it it worked: root@kubuntu:~# efibootmgr BootCurrent: 0000 BootOrder: 0000,0001 Boot0000* EFI USB Device Boot0001* Windows Boot Manager root@kubuntu:~# efibootmgr --create --gpt --disk /dev/sda --part 3 --write-signature --label "GRUB2" --loader "\\EFI\\ubuntu\\grubx64.efi" BootCurrent: 0000 BootOrder: 0002,0000,0001 Boot0000* EFI USB Device Boot0001* Windows Boot Manager Boot0002* GRUB2 root@kubuntu:~# efibootmgr BootCurrent: 0000 BootOrder: 0002,0000,0001 Boot0000* EFI USB Device Boot0001* Windows Boot Manager Boot0002* GRUB2 However, on rebooting, as you guessed, the machine rebooted directly back into Windows. The only things I can think of are: The sda1 partition is somehow being used Overwrite /EFI/Boot/bootx64.efi and /EFI/Microsoft/Boot/bootmgfw.efi with grubx64.efi [but this seems really radical]. Can anyone please help me out? Thanks -- any help is greatly appreciated, as this issue is driving me crazy!

    Read the article

  • Sony VAIO is booting directly into Windows without showing grub

    - by Rohan Dhruva
    I bought a new Sony Vaio S series laptop. It uses Insyde H2O BIOS EFI, and trying to install Linux on it is driving me crazy. root@kubuntu:~# parted /dev/sda print Model: ATA Hitachi HTS72756 (scsi) Disk /dev/sda: 640GB Sector size (logical/physical): 512B/4096B Partition Table: gpt Number Start End Size File system Name Flags 1 1049kB 274MB 273MB fat32 EFI system partition hidden 2 274MB 20.8GB 20.6GB ntfs Basic data partition hidden, diag 3 20.8GB 21.1GB 273MB fat32 EFI system partition boot 4 21.1GB 21.3GB 134MB Microsoft reserved partition msftres 5 21.3GB 342GB 320GB ntfs Basic data partition 6 342GB 358GB 16.1GB ext4 Basic data partition 7 358GB 374GB 16.1GB ntfs Basic data partition 8 374GB 640GB 266GB ntfs Basic data partition What is surprising is that there are 2 EFI system partitions on the disk. The sda2 partition is a 20gb recovery partition which loads windows with a basic recovery interface. This is accessible by pressing the "ASSIST" button as opposed to the normal power button. I presume that the sda1 EFI System Partition (ESP) loads into this recovery. The sda3 ESP has more fleshed out entries for Microsoft Windows, which actually goes into Windows 7 (as confirmed by bcdedit.exe on Windows). Ubuntu is installed on sda6, and while installation I chose sda3 as my boot partition. The installer correctly created a sda3/EFI/ubuntu/grubx64.efi application. The real problem: for the life of me, I can't set it to be the default! I tried creating a sda3/startup.nsh which called grubx64.efi, but it didn't help -- on rebooting, the system still boots into windows. I tried using efibootmgr, and that shows as it it worked: root@kubuntu:~# efibootmgr BootCurrent: 0000 BootOrder: 0000,0001 Boot0000* EFI USB Device Boot0001* Windows Boot Manager root@kubuntu:~# efibootmgr --create --gpt --disk /dev/sda --part 3 --write-signature --label "GRUB2" --loader "\\EFI\\ubuntu\\grubx64.efi" BootCurrent: 0000 BootOrder: 0002,0000,0001 Boot0000* EFI USB Device Boot0001* Windows Boot Manager Boot0002* GRUB2 root@kubuntu:~# efibootmgr BootCurrent: 0000 BootOrder: 0002,0000,0001 Boot0000* EFI USB Device Boot0001* Windows Boot Manager Boot0002* GRUB2 However, on rebooting, as you guessed, the machine rebooted directly back into Windows. The only things I can think of are: The sda1 partition is somehow being used Overwrite /EFI/Boot/bootx64.efi and /EFI/Microsoft/Boot/bootmgfw.efi with grubx64.efi [but this seems really radical]. Can anyone please help me out? Thanks -- any help is greatly appreciated, as this issue is driving me crazy!

    Read the article

  • Pathfinding in multi goal, multi agent environment

    - by Rohan Agrawal
    I have an environment in which I have multiple agents (a), multiple goals (g) and obstacles (o). . . . a o . . . . . . . o . g . . a . . . . . . . . . . o . . . . o o o o . g . . o . . . . . . . o . . . . o . . . . o o o o a What would an appropriate algorithm for pathfinding in this environment? The only thing I can think of right now, is to Run a separate version of A* for each goal separately, but i don't think that's very efficient.

    Read the article

  • How can I revive a dead translation team?

    - by Rohan
    I wish to translate ubuntu in Marathi language for which a translation team already exists. But the membership of the team is moderated and unfortunately no new member has been admitted in the team after 2010-Dec-12. All request of membership are pending after that date. I tried to contact administrator of the team at his personal email id but did not get any reply from him. As I am not a team member I can not upload my translated po file. Is there any way to take charge of the team and approve all pending request? It seems that no translation work is currently being carried out. I would like to do the work but I can not.

    Read the article

  • Avoid apt-get update while installing softwares on ubuntu, possible?

    - by Rohan
    I want to install a 27KB lens( reddit-lens: here ) & this "apt-get update" is going to download 20MBs(!) of data for the same. I want to avoid this update bcoz i am on a limited bandwidth connection. I also tried to install .deb file(27KB) for this lens but it says "dependancy is not satisfiable gir1.2-unity-3.0". I went on to http://www.pkgs.org to get that package & there is no version available for ubuntu 12.04. What should I do? Can i install softwares without updating cache? Is that update necessary? Also installation of some softwares requires updating cache while others dont, why?

    Read the article

  • I know fundamental programming. But how do I get started in game development now?

    - by Rohan Menon
    I'm a 20 year old programming student. I know fundamental programming in BASIC, C, C++ and JAVA. What I wanted to ask is, where do I go from here? Are there any books that the community can mention that will help me develop a game or at least learn game development? I've had a lot of ideas and really want to make some sort of prototype to see if I'm suited for the industry. I really don't mind learning any new languages but I need to know what I should begin with. A good book that will help with a little more understanding as I go up will be very helpful. Maybe a tutorial to develop some basic 2D games like a side-scroller, snake or pocket tanks in an easy to understand SDK? I know that to get some credit under your belt, you need to be able to make a few games on your own. Also, what platform should I start on? The PC, iOS or Android (as an introduction) for now. I don't want to get into high level game design just yet. Just something a bit basic to help out in future development. Anything pointing me in the right direction will be really really helpful. Edit: Also, I want to say that I'm looking towards this from a game designer's point of view more than a game programmer. I want suggestions on any SDKs or easy to use programs I can use to understand game design. Then delve deeper into the programming after that. Not as employment but as developing your own games (for now).

    Read the article

  • Restful WebAPI VS Regular Controllers

    - by Rohan Büchner
    I'm doing some R&D on what seems like a very confusing topic, I've also read quite a few of the other SO questions, but I feel my question might be unique enough to warrant me asking. We've never developed an app using pure WebAPI. We're trying to write a SPA style app, where the back end is fully decoupled from the front end code Assuming our service does not know anything about who is accessing/consuming it: WebAPI seems like the logical route to serve data, as opposed to using the standard MVC controllers, and serving our data via an action result and converting it to JSON. This to me at least seems like an MC design... which seems odd, and not what MVC was meant for. (look mom... no view) What would be considered normal convention in terms of performing action(y) calls? My sense is that my understanding of WebAPI is incorrect. The way I perceive WebAPI, is that its meant to be used in a CRUD sense, but what if I want to do something like: "InitialiseMonthEndPayment".... Would I need to create a WebAPI controller, called InitialiseMonthEndPaymentController, and then perform a POST... Seems a bit weird, as opposed to a MVC controller where i can just add a new action on the MonthEnd controller called InitialisePayment. Or does this require a mindset shift in terms of design? Any further links on this topic will be really useful, as my fear is we implement something that might be weird an could turn into a coding/maintenance concern later on?

    Read the article

  • Make My Own Made Java Based Text editor as default Text Editor in Windows

    - by Rohan Sharma
    I have Made a Text Editor in Java and i want to make it default text editor ,That is like in windows we have notepad as default text whose icon shows on all text files and double clicking those file(s) opens the file(s) in notepad window.. I Want to achieve same Task of Making my texte editor as default one...but only right clicking a text file and selecting my text editor as default app for opening text files do not servers the purpose,Because my text editor will not accept the file input that way,its made to accept the file input only by FileChooser...so Is There any library in java to achieve that task Of Accepting The File Input That way???

    Read the article

  • OpenVPN not with Windows 7 PCs on client Lan

    - by Rohan
    I have a setup with a router running OpenWRT with an openvpn client. Windows 7 pc's cannot access the vpn. They time out trying to access servers on the VPN. The mystery to me is that the setup works fine for my laptop running ubuntu. I can access the VPN without any issues. I previously had a router running Tomato with the same openvpn setup and all the computers could access the VPN. What could account for the difference in behaviour? Is there something I am missing in the OpenWRT setup that is required for windows networking that is on by default with tomato? To clarify the OpenVPN client is on the OpenWRT router. The client connects to the OpenVPN server. But when I try to access the VPN from Windows computers on my network I cannot.

    Read the article

  • Problems debugging using Cygwin gdb in Eclipse CDT(Helios)

    - by Rohan
    I am trying to debug an application using Eclipse CDT and cygwin gdb and I am facing a problem if my code calls Sleep(), it looks like whenever a sleep is encountered in the code the debugger seems to go in an infinite loop(I meant it never terminates or hit a breakpoint after sleep). On pressing pause the code is stuck on one of the thread on sigint::interrupt. Even my debugger console windows throw these error in the console output: [New thread 5968.0x1f98] Error: dll starting at 0x774a0000 not found. Error: dll starting at 0x775c0000 not found. [New thread 5968.0x19e8] Any idea what are these errors about? It would be helpful if someone can help me out here as I am new to eclipse and I am used to using VS so it has made be lazy to be honest and expect things to work out of box. Here are more details if required Windows 7 x64 bit. Eclipse 3.6 Helios with CDT plug-in compiled from the CVS head. Cygwin latest from website, I think it is 1.71

    Read the article

  • Using Audio Queue Services to play PCM data over a socket connection

    - by Rohan
    I'm writing a remote desktop client for the iPhone and I'm trying to implement audio redirection. The client is connected to the server over a socket connection, and the server sends 32K chunks of PCM data at a time. I'm trying to use AQS to play the data and it plays the first two seconds (1 buffer worth). However, since the next chunk of data hasn't come in over the socket yet, the next AudioQueueBuffer is empty. When the data comes in, I fill the next available buffer with the data and enqueue it with AudioQueueEnqueueBuffer. However, it never plays these buffers. Does the queue stop playing if there are no buffers in the queue, even if you later add a buffer? Here's the relevant part of the code: void wave_out_write(STREAM s, uint16 tick, uint8 index) { if(items_in_queue == NUM_BUFFERS){ return; } if(!playState.busy){ OSStatus status; status = AudioQueueNewOutput(&playState.dataFormat, AudioOutputCallback, &playState, CFRunLoopGetCurrent(), NULL, 0, &playState.queue); if(status == 0){ for(int i=0; i<NUM_BUFFERS; i++){ AudioQueueAllocateBuffer(playState.queue, 40000, &playState.buffers[i]); } AudioQueueAddPropertyListener(playState.queue, kAudioQueueProperty_IsRunning, MyAudioQueuePropertyListenerProc, &playState); status = AudioQueueStart(playState.queue, NULL); if(status ==0){ playState.busy = True; } else{ return; } } else{ return; } } playState.buffers[queue_hi]->mAudioDataByteSize = s->size; memcpy(playState.buffers[queue_hi]->mAudioData, s->data, s->size); AudioQueueEnqueueBuffer(playState.queue, playState.buffers[queue_hi], 0, 0); queue_hi++; queue_hi = queue_hi % NUM_BUFFERS; items_in_queue++; } void AudioOutputCallback(void* inUserData, AudioQueueRef outAQ, AudioQueueBufferRef outBuffer) { PlayState *playState = (PlayState *)inUserData; items_in_queue--; } Thanks!

    Read the article

  • filtering jqgrid based on user input

    - by Rohan
    hi, everything is working fine with my jqgrid except a small issue. i have defined postData below: $(document).ready(function() { $("#ctl00_ContentPlaceHolder2_drpUSite").change(function() { site = ($("#ctl00_ContentPlaceHolder2_drpUSite").val()); loadusergrid(); }); var usrparams = new Object(); var site = ($("#ctl00_ContentPlaceHolder2_drpUSite").val()); //----grid code--------- $("#users").jqGrid({ prmNames: { _search: "isSearch", nd: null, rows: "numRows", page: "page", sort: "sortField", order: "sortOrder" }, // add by default to avoid webmethod parameter conflicts postData: { searchString: '', searchField: '', searchOper: '', sites: site }, datatype: function(postdata) { mtype: "GET", $.ajax({ url: 'Users.aspx/GetUsers', type: "POST", contentType: "application/json; charset=utf-8", data: JSON.stringify(postdata), dataType: "json", success: function(data, st) { if (st == "success") { var grid = $("#users")[0]; var m = JSON.parse(data.d); grid.addJSONData(m); } }, error: function() { alert("Loading Failed!"); } }); }, // this is what jqGrid is looking for in json callback jsonReader: { root: "rows", page: "page", total: "total", records: "records", cell: "cell", id: "login", repeatitems: true }, colNames: ['Login', 'First Name', 'Last Name', 'Email', 'Site', 'Role', 'Room', 'UnitID', 'Supervisor', 'Super'], colModel: [ { name: 'login', index: 'login', width: 20 }, { name: 'fname', index: 'fname', width: 20, hidden: true }, { name: 'lname', index: 'lname', width: 60, align: "center", sortable: true, searchoptions: { sopt: ['eq', 'ne']} }, { name: 'email', index: 'email', width: 20, align: "center", sortable: false }, { name: 'site', index: 'site', width: 50, align: "center", sortable: true, searchoptions: { sopt: ['eq', 'ne']} }, { name: 'role', index: 'role', width: 15, align: "center", sortable: true, searchoptions: { sopt: ['eq', 'ne']} }, { name: 'room', index: 'room', width: 30, align: "center", sortable: true }, { name: 'unitid', index: 'unitid', width: 10, align: "center", sortable: false }, { name: 'super', index: 'super', width: 20 }, { name: 'supername', index: 'supername', width: 10, align: "center", sortable: false }, ], pager: "#pageusers", viewrecords: true, caption: "Registered Users", imgpath: 'themes/steel/images', rowNum: 20, rowList: [10, 20, 30, 40, 50], sortname: "pname", sortorder: "desc", showpage: true, gridModel: true, gridToolbar: true, onSelectRow: function(id) { var ret = jQuery("#users").getRowData(id); accpara.id = ret.id; accpara.pname = ret.pname; accpara.pid = ret.pid; accpara.bld = ret.bld; accpara.cname = ret.cname; accpara.amt = ret.amt; accpara.status = ret.status; accpara.notes = ret.notes; accpara.lname = ret.lname; } }); jQuery("#users").navGrid('#pageusers', { view: false, del: false, add: false, edit: false }, {}, // default settings for edit {}, // default settings for add {}, // delete {closeOnEscape: true, multipleSearch: true, closeAfterSearch: true }, // search options {} ); $("#users").setGridWidth(1300, true); $("#users").setGridHeight(500, true); jQuery("#users").jqGrid('filterToolbar'); //----grid code ends here function loadusergrid() { $("#users").setGridParam({ page: 1 }, { pgbuttons: true }, { pginput: true }, { postData: { "site": site} }).trigger("reloadGrid"); } }); when page loads for the 1st time, this works.. now i have 4 drop-downs which filter users. i have written a function which reloads the grid when the dropdown is changed, but it isnt working.. what am i doing wrong here?? when i enable postback for the dropdowns, i get the filtered result. i want to avoid postbacks on my page :). right now i have added just the site dropdown as the filter. once this starts working ill add the remaining 3. firebug shows the ajax call is fired successfully but with an empty sitename. please note that the site dropdown cntains an empty value when page is loaded for the 1st time. thanks in advance

    Read the article

  • User input in perl - Issue with running script in KomodoEdit

    - by golwalkar.rohan
    i wrote this tiny code on gedit and ran it :- #/usr/bin/perl print "Enter the radius of circle: \n"; $radius = <>; chomp $radius; print "radius is: $radius\n"; $circumference = (2*3.141592654) * $radius; print "Circumference of circle with radius : $radius = $circumference\n"; Runs fine using command line.Ran the same code on Komodo Edit: facing an issue i expect first line as output as :- Enter the radius of circle: whearas it waits on the screen i.e waiting for an input and after that runs everything in sequence -- can someone tell me why it runs fine with command line but not Komodo?

    Read the article

  • Generic structure for performing string conversion when data binding.

    - by Rohan West
    Hi there, a little while ago i was reading an article about a series of class that were created that handled the conversion of strings into a generic type. Below is a mock class structure. Basically if you set the StringValue it will perform some conversion into type T public class MyClass<T> { public string StringValue {get;set;} public T Value {get;set;} } I cannot remember the article that i was reading, or the name of the class i was reading about. Is this already implemented in the framework? Or shall i create my own?

    Read the article

  • Maintain one to one mapping between objects

    - by Rohan West
    Hi there, i have the following two classes that provide a one to one mapping between each other. How do i handle null values, when i run the second test i get a stackoverflow exception. How can i stop this recursive cycle? Thanks [TestMethod] public void SetY() { var x = new X(); var y = new Y(); x.Y = y; Assert.AreSame(x.Y, y); Assert.AreSame(y.X, x); } [TestMethod] public void SetYToNull() { var x = new X(); var y = new Y(); x.Y = y; y.X = null; Assert.IsNull(x.Y); Assert.IsNull(y.X); } public class X { private Y _y; public Y Y { get { return _y; } set { if(_y != value) { if(_y != null) { _y.X = null; } _y = value; if(_y != null) { _y.X = this; } } } } } public class Y { private X _x; public X X { get { return _x; } set { if (_x != value) { if (_x != null) { _x.Y = null; } _x = value; if (_x != null) { _x.Y = this; } } } } }

    Read the article

  • Some regular expression help?

    - by Rohan
    Hey there. I'm trying to create a Regex javascript split, but I'm totally stuck. Here's my input: 9:30 pm The user did action A. 10:30 pm Welcome, user John Doe. ***This is a comment 11:30 am This is some more input. I want the output array after the split() to be (I've removed the \n for readability): ["9:30 pm The user did action A.", "10:30 pm Welcome, user John Doe.", "***This is a comment", "11:30 am This is some more input." ]; My current regular expression is: var split = text.split(/\s*(?=(\b\d+:\d+|\*\*\*))/); This works, but there is one problem: the timestamps get repeated in extra elements. So I get: ["9:30", "9:30 pm The user did action A.", "10:30", "10:30 pm Welcome, user John Doe.", "***This is a comment", "11:30", "11:30 am This is some more input." ]; I cant split on the newlines \n because they aren't consistent, and sometimes there may be no newlines at all. Could you help me out with a Regex for this? Thanks so much!!

    Read the article

  • Google chrome extension: local storage

    - by Rohan
    Hi there I'm developing an extension for Google Chrome, and have run into some trouble.I created an options.html page and added it to the manifest.json file.The page shows properly. I saved the options, and then went back to the page on which the extension is supposed to run. Unfortunately, the Local storage for the options was returning a 'null' instead of the option. If I set the local storage option directly from the extension's JS script, it works fine but not if it was set from the options page. Any idea how i can access the options.html local storage values from my Javascript file in the extension? thanks!

    Read the article

1 2 3  | Next Page >