Posts

How to convert a string into a date in swift -

i parsed code "1442351280" json , and want convert date in swift in medium style. you have with foundation api let date = nsdate(timeintervalsince1970: 1442351280)

html - How to get value of generated row value for another action when generated submit button is clicked -

i want know how dynamically generated table row value (eg. empp_id) when clicking submit button generated each row dynamically. below code. used generate each row , submit button each row. don't know how use submit button , pass value of 'id' column action. struts.xml <?xml version="1.0" encoding="utf-8"?> <!doctype struts public "-//apache software foundation//dtd struts configuration 2.3//en" "http://struts.apache.org/dtds/struts-2.3.dtd"> <struts> <constant name="struts.enable.dynamicmethodinvocation" value="false" /> <constant name="struts.devmode" value="false" /> <package name="default" namespace="/" extends="struts-default"> <action name="edit" class="com.ojt.database.edituseraction" method="execute"> <result name="success">e...

python - Accessing `http://localhost:8080/admin/djcelery/` returns 403 in Django -

i trying access http://localhost:8080/admin/djcelery/ in django admin. can access http://localhost:8080/admin , can run celery task can't access djcelery admin site. here url url(r'^admin/', include(admin.site.urls)), here settings.py import djcelery djcelery.setup_loader() broker_url = "amqp://guest:guest@localhost:5672//" celery_result_backend='djcelery.backends.database:databasebackend' celerybeat_scheduler = 'djcelery.schedulers.databasescheduler' do have add additional access admin/djcelery/ ? i assume have installed package pip install django-celery make sure added in installed_apps installed_apps += ("djcelery", ) and run migrate python manage.py migrate djcelery if still not load can glance detailed documentation

regex - PHP Web Crawler doesn't crawl .php files -

this simple webcrawler trying build <?php $to_crawl = "http://samplewebsite.com/about.php"; function get_links($url) { $input = @file_get_contents($url); $regexp = " <a\s[^>]*href=(\"??)([^\" >]*?)\\1[^>]*>(.*)<\/a> "; preg_match_all("/$regexp/siu", $input, $matches); $l = $matches[2]; foreach ($l $link) { echo $link."</br>"; } } get_links($to_crawl); ?> when try run script $to_crawl variable set url ending file name, e.g. "facebook.com/about", works, reason, echo's nothing when link ending '.php' filename. can please help? to links , inner texts, can use domdocument this: $dom = new domdocument; @$dom->loadhtml($input); // input (html code) $xp = new domxpath($dom); $links = $xp->query('//a[@href]'); // xpath <a> tags href attr...

add dns record in from c# -

how add record in dns using c#, trying use below code, no luck. manage dns server c# code addarecord("dns01.iaxus.com", "iaxus.com", "10.0.0.20", "14.145.101.55"); 14.145.101.55 wan ip. its throwing below error. the rpc server unavailable. (exception hresult: 0x800706ba) please help. try running application administrator if doesn't work try disabling firewall , run administrator.

How can I extend ApplicationUser in ASP.NET Identity but with properties that can be null? -

i extend application user. here's example: public class applicationuser : identityuser { public async task<claimsidentity> generateuseridentityasync(usermanager<applicationuser> manager) { var useridentity = await manager.createidentityasync(this, defaultauthenticationtypes.applicationcookie); return useridentity; } public string address { get; set; } public string city { get; set; } public string state { get; set; } i tried seems when login if of these properties set null in database when /token call made returns error. can tell me. need make change way these properties set here or in place? if understand question correctly, simple solution problem create nullable type . can please share do? create custom identity provider, example?

javascript - How can I generate kendo tree view from hierarchical data? AngularJS -

how can add data source kendo-tree-view data, id in case projectattachmentfolderid , parent id - projectattachementfolderparentid var flatdata = [{ "projectattachmentfolderid": null, "projectattachementfolderparentid": -1, "projectattachmentfoldername": "root", "projectiattachmenthasuniquepermissions": 1, "projectiattachmentisfolder": 1, "cancreate": true, "candelete": true, "canread": true, "canupdate": true, "projectattachmentfolderid2": null, "projectiattachmentid": -1, "foldertype": null, "id": 0 }, { "projectattachmentfolderid": 5112, "projectattachementfolderparentid": null, "projectattachmentfoldername": "dokumenty klienta", "projectiattachmenthasuniquepermissions": 1, "projectiattachmentisfolder": 1, "cancreate": true, "candelete": true, ...