Posts

Showing posts from July, 2013

sql - Multiple stored procedures for a purge script? -

sql - Multiple stored procedures for a purge script? - i in process of creating purge script in vbscript, deletes records tables if more 1 month old. the criteria each table different, , there both parent , kid tables (i.e. latter dependent on former retrieving id codes , upload statuses). my question: should each delete block each table created separate procedure, including kid , parent deletions? how best , efficiently handled? a sample of sql code: delete teststaging.dbo.spindataentries teststaging.dbo.spindataentries.spindataid in (select teststaging.dbo.spindata.spindataid teststaging.dbo.spindata teststaging.dbo.spindata.uploadstatus in ('f', 'c') , lastuploaded < dateadd (m,- 1,sysdatetime())); delete teststaging.dbo.spindata teststaging.dbo.spindata.uploadstatus in ('f', 'c') , lastuploaded < dateadd (m,- 1,sysdatetime()); should each of these 2 blocks, remaining code, logged separate stored procedures, , called separat

formatting - SAS SQL Datepart function returning odd values -

formatting - SAS SQL Datepart function returning odd values - i'm having massive problem project can't seem right. i'm trying modify info variable in datetime format. first info 30mar12:00:00:00. i've been advised utilize code below returns value 30mar60:5:30:00. want date component , have no thought how info got exported in format wasn't in microsoft access. i've tried several mods code 1 time again comes blank or sends error message. proc sql; update dataset set date = datepart(date); quit; any advice appreciated. i'm guessing variable date numeric , formatted datetime. 1 time you've carried out conversion, alter format date9. sas datetime value number of seconds since 01 jan 1960, whereas dates number of days since 01 jan 1960. both stored numbers, using right format display value key. illustration below. data _null_; a='30mar12:00:00:00'dt; b=datepart(a); c=b; format b datetime. c date9.; set b c; run;

javascript - Simple JQuery script animate not working -

javascript - Simple JQuery script animate not working - so created simple html page : index.html file: <html> <head> </head> <body> <div class="menu"> hello </div> <div class="test"> menu </div> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script src="app.js"></script> </body> </html> here app.js file: var main = function() { $('.test').click(function(){ $('body').animate({ left: '500px' },200); }) } $(document).ready(main) i'm trying understand did wrong , seems should work.. was tried download jquery-2.1.1.min.js , work , still while clicking on menu , text not moving .. you need set position css property body in order work left . body{ position:relative;

java - Different Between this two method in jsp page -

java - Different Between this two method in jsp page - what difference between: this.log("log message"); and ((httpservlet)page).log("anothermessage"); ? if @ generated servlet jsp find this , page both same. here page , implicit object in jsp. generate servlet code jsp: public void _jspservice(httpservletrequest request, httpservletresponse response) throws java.io.ioexception, servletexception { pagecontext pagecontext = null; httpsession session = null; servletcontext application = null; servletconfig config = null; jspwriter out = null; object page = this; // page , same jspwriter _jspx_out = null; pagecontext _jspx_page_context = null; ... the log() method defined in genericservlet . here tomcat(apache) specific implementation of generated servlet jsp: javax.servlet.genericservlet extended byjavax.servlet.http.httpservlet extended byorg.apache.jasper.runtime.http

reporting services - Adding First Values Grouped by ID from record set; report builder 3.0 -

reporting services - Adding First Values Grouped by ID from record set; report builder 3.0 - i have dataset beingness returned has monthly values different 'goals.' goals has unique id's , month/date values same goals. difference 1 goal doesn't have values same months other goal because might start @ later date, , want 'consolidate' results , sum them based on 'first' startbalance each goal. illustration dataset be; goalid monthdate startbalance 1 1/1/2014 10 1 2/1/2014 15 1 3/1/2014 22 1 4/1/2014 30 2 4/1/2014 13 2 5/1/2014 29 what want display these consolidated (summed) values in table based on 'first' (earliest month/year) value each goal. result like; year startbalance 2014 23 this because 'first' value goalid of 1 10 , 'first' value goalid of 2 '13' when seek grouping year(fields!monthdate.value)

vb.net - Visual basic membership program using select case? -

vb.net - Visual basic membership program using select case? - i writing programme asks user age , number of years have been member, trying through using select case. doesn't appear working, of ages fine if utilize checkbox veteran , should discount doesn't work. number of years have been fellow member doesn't alter price/ category, programme simple , i'm not sure why isn't working. screen shot of program:http://gyazo.com/ebab66526068f4c81a30c624aada7f7c code: public class form1 private sub btncalc_click(byval sender system.object, byval e system.eventargs) handles btncalc.click dim x integer dim y integer x = val(txtage.text) y = val(txtyears.text) select case x case <= 18 lblprice.text = ("£60") lblcategory.text = ("junior") case 19 49 lblprice.text = ("£120") lblcategory.text = ("senior") case >= 50

r - Create a bivariate color gradient legend using lattice for an spplot overlaying polygons with alpha -

r - Create a bivariate color gradient legend using lattice for an spplot overlaying polygons with alpha - i've created map overlaying polygons using spplot , alpha value of fill set 10/255 areas more polygons overlapping have more saturated color. polygons set 2 different colors (blue , red) based on binary variable in attribute table. thus, while color saturation depends on number of polygons overlapping, color depends on ratio of bluish , reddish classes of polygons. there is, of course, no easy built-in legend need create 1 scratch. there nice solution in base of operations graphics found here. came not-so-good hack in ggplot based on this post kohske. similar question posted here , did best give solutions, couldn't come solid answer. need same myself, utilize r , utilize grid graphics. this ggplot hack came with variable_a <- 100 # max of variable variable_b <- 100 x <- melt(outer(1:variable_a, 1:variable_b)) # set info frame plot p <

Is there a C# method that stores all user generated events inside a form? -

Is there a C# method that stores all user generated events inside a form? - i c# beginner, 4th day programming in c#. writing gui application has handful of buttons, , parse big file, , show parsed info on gui combo box. debugging purpose, , improving quality of code, capture logs of user generated events, preferably storing every button click, or combo box selection made (not every mouse movement, nor form getting focus, or other trivial events) in text file. c# events logging journal

c++ - pass reference to class inherited from abstract base class -

c++ - pass reference to class inherited from abstract base class - i want pass pointer class inherited abstract base of operations class, exc_bad_access error (when calling function f()) in next (much simplified) code class { double *pointer; public: a(double *p) { pointer = p; }; virtual void f() = 0; }; class b :public a{ double *pointer; public: b(double *p_) : a(p_){}; void f(){std::cout << pointer[0] << std::endl;}; }; if phone call e.g. this double p[2] = {1.,2.}; b b(p); b.f(); the problem doesn't seem there if base of operations class not abstract, can't figure out what's wrong above code. help in solving this, , maybe suggesting different way of achieving kind of construction appreciated! the problem "pointer[0]" in f() ends accessing pointer fellow member of b class, not pointer fellow member of a superclass. and since it's not initialized, in example, it'

javascript - Setting a cookie that triggers a redirect -

javascript - Setting a cookie that triggers a redirect - <!doctype html> <html> <head> <title>login test</title> <script> window.onload = iniall; function iniall(){ document.getelementbyid("client").onclick = setcookie; var setcookie = function(exdays){ var d = new date(); d.setime(d.gettime() + (exdays *20*60*60*1000)); var expires = "expires="+d.toutcstring(); documenet.cookie = test = "=" + test + "; " loadpagec(); } var loadpagec = function(){ window.location = "http://www.cnn.com"; homecoming false; } if (document.cookie === "test = test"){ homecoming loadpagec; } else { } } </script> </head> <body

android - Declare local jar file as a transitive dependency of a library project -

android - Declare local jar file as a transitive dependency of a library project - i have android app (app1) depends on library project (lib1). library project has several remote dependencies (e.g. guava, android back upwards library, etc) , 2 local dependencies, jar files stored in lib1/libs/. this how dependencies section of build.gradle of lib1 looks like: dependencies { compile filetree(dir: 'libs', include: '*.jar') compile 'com.android.support:support-v4:20.0.+' compile 'com.google.guava:guava:r08' } if compile library (i.e. running gradle assemble on lib1/ folder) compiles correctly when add together library dependency of app1 gradle complains that cannot find 2 jars in libs/ folder of lib1. this build.gradle of app1: dependencies { compile project(':lib1') compile 'org.apache.james:apache-mime4j-core:0.7.2' compile 'org.apache.jackrabbit:jackrabbit-webdav:2.3.6' ... } is there way t

ios - application crashing with - dyld: Symbol not found: _NSURLAuthenticationMethodServerTrust -

ios - application crashing with - dyld: Symbol not found: _NSURLAuthenticationMethodServerTrust - i using xcode 6 . application runs on simulator when using device after building application crashed , sending report. code running xcode 5. dyld: symbol not found: _nsurlauthenticationmethodservertrust referenced from: /var/mobile/applications/7ba2b5a2-e764-46f6-a012-8fb94bcd1c4c/futureapi.app/futureapi expected in: /system/library/frameworks/cfnetwork.framework/cfnetwork in /var/mobile/applications/7ba2b5a2-e764-46f6-a012-8fb94bcd1c4c/futureapi.app/futureapi answer https://github.com/afnetworking/afnetworking/issues/2109. have deleted cfnetwork.framework , code running. ios objective-c iphone xcode6

ios - Non UIViewController Class in Swift -

ios - Non UIViewController Class in Swift - i m new ios. i want know how create non uiviewcontroller based class. mean class not extending uiviewcontroller. i want because want phone call async http url , parse json/xml in non ui class. want them in separate class uiviewcontroller classs. please help me create new class without inheritance this: class jsonobject{ var url: nsurl? internal func parsejson() -> nsarray { // code parse json homecoming [] } } and can create instance of class elsewhere using this: var newjsonobject: jsonobject = jsonobject() newjsonobject.url = nsurl(string: "www.somejson.php") newjsonobject.parsejson() ios class swift uiviewcontroller

javascript - how to implement device orientation in html5 with phaser framework -

javascript - how to implement device orientation in html5 with phaser framework - i trying create simple game phaser framework uses device orientation api , tried motion not done. here code ` preload: function() { game.stage.backgroundcolor = '#64fe2e'; game.load.image('gau','assets/ball.png'); }, create: function() { this.ball = this.game.add.sprite(100,245, 'gau'); }, update: function() { // function called 60 times per sec if(this.ball.inworld == false) this.restart_game(); keys = this.game.input.keyboard.createcursorkeys(); window.addeventlistener("deviceorientation", this.handleorientation, true); }, handleorientation: function(e) { var x = e.gamma; // range [-90,90] var y = e.beta; // range [-180,180] this.ball.body.velocity.x -= x*2; this.ball.body.velocity.y -= y*4; }, ` it looks scope issue. 'this' within handleorientation refer 'window'. window.a

regex command line linux - select all lines between two strings -

regex command line linux - select all lines between two strings - i have text file contents this: here super text: text should selected cool match , how ends blah blah... i trying 2 lines (but more or less lines) between: some super text: and and how i using grep on ubuntu machine , lot of patterns i've found seem specific different kinds of regex engines. so should end this: grep "my regex goes here" myfilenamehere not sure if egrep needed, utilize easy. i don't see how done in grep . using awk : awk '/^and how/ {p=0}; p; /some super text:$/ {p=1}' file regex linux grep

python - how to obtain string values of a list -

python - how to obtain string values of a list - i'm beginner in pyqt , made formular. self.tname1, self.tlname1, self.tcel, self.tcel1,self.tcc1, self.temail, self.ttel qlineedit , set these variables in list. then, made loop in order evaluate each qlineedit value , fill them if empty 'null'. loop works i'm trying print values within list. example: ['null','null','3176797100','null','null','1098685161','mm@gmail.com', 'null'] doesn't work. self.tname1 = qtgui.qlineedit(self) self.tname1.move(85,176) self.tname1.resize(199,30) self.tlname1 = qtgui.qlineedit(self) self.tlname1.move(95,210) self.tlname1.resize(190,30) def eval(self): var=[self.tname1, self.tlname1, self.tcel, self.tcel1,self.tcc1, self.temail, self.ttel] i=0 in range(len(var)): if var[i]=="": var[i]='null' else: pass print var print self.tname1.t

android - setCompoundDrawables on drawable shape with no effect -

android - setCompoundDrawables on drawable shape with no effect - i'm trying set overline textview using compound drawables. i've created line shape in xml drawable resource looks this: <?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="line"> <stroke android:width="1dp" android:color="#000000" /> <solid android:color="#00000000" /> </shape> now i'm trying set overline textview this: textview root=(textview)findviewbyid(r.id.root); drawable background=getresources().getdrawable(r.drawable.overline); root.setcompounddrawables(null,background,null,null); but ignores instruction , overline doesn't appear. i've considered using compounddrawableswithintrinsicbounds, doesn't work either. xml shape wrong or using method in wrong way? give thanks muc

c - How to find execute files in Linux? -

c - How to find execute files in Linux? - i wants names of execute files in directory in linux. how can it? i tried utilize opendir this: dir = opendir(directoryname); i need names of execute files. programming in c. thanks :) you should define mean executable files. that file execute bit (it owner, group, or other) set. test access(2) & x_ok and/or utilize stat(2). that elf executables. see elf(5); issue might check file indeed executed, might hard (what missing library dependencies? or ill-formed elf files?). maybe utilize libelf (and/or libmagic equivalent of file(1) command). to scan recursively file tree, utilize nftw(3); scan directory utilize opendir(3) & readdir(3) (don't forget closedir !), you'll need build finish file path each directory entry (perhaps using snprintf(3) or asprintf(3)) see advanced linux programming c linux ubuntu directory system-calls

c# - Uncaught Error when loading page -

c# - Uncaught Error when loading page - i( have mvc 5 application using angularjs , boot strap. when page loads modal doesnt launch , next err in console: uncaught error: [$injector:modulerr] http://errors.angularjs.org/1.2.8/$injector/modulerr?p0=myapp&p1=error%3a%2….c%20(http%3a%2f%2flocalhost%3a60248%2fscripts%2fangular.min.js%3a17%3a431) here html: layout: <!doctype html> <html ng-app ="myapp"> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>temujin @viewbag.title</title> <link href="~/content/bootstrap.min.css" rel="stylesheet" type="text/css" /> <link href="~/content/site.css" rel="stylesheet" type="text/css" /> <script src="~/scripts/modernizr-2.6.2.js"></script> <script src="~/scripts/jquery-1.10.2.min.js">&

c# - Entity Framework Many to Many Code FIrst -

c# - Entity Framework Many to Many Code FIrst - i have next (simplified) classes: using system; using system.collections.generic; using system.data.entity; using system.data.entity.modelconfiguration.conventions; using system.linq; using system.text; using system.threading.tasks; namespace eftest { public class textcontext : dbcontext { public dbset<people> people { get; set; } public dbset<file> files { get; set; } protected override void onmodelcreating(dbmodelbuilder modelbuilder) { modelbuilder.conventions.remove<manytomanycascadedeleteconvention>(); } } public class people { public people() { files = new list<file>(); } public int peopleid { get; set; } public string nombre { get; set; } public list<file> files { get; set; } } public class file { public file() { friends

asp.net web api - Right approach to enriching JSON data from a Web API call before sending the ActionResult back in MVC 5 -

asp.net web api - Right approach to enriching JSON data from a Web API call before sending the ActionResult back in MVC 5 - i'm new asp.net mvc 5(mvc , web api in general), i'm looking approach creating viewmodel in mvc controller based on info making web api call. the web api phone call method returns info this public actionresult getconfigtable([datasourcerequest] datasourcerequest request) { var emp = new fpecmentities(); iqueryable<models.mytable> empsecurity = emp.mytable; datasourceresult result = empsecurity.todatasourceresult(request); homecoming json(result, jsonrequestbehavior.allowget); } my views controller method looks public actionresult config_read([datasourcerequest] datasourcerequest request) { var configtable = json(mysolution.api.controllers.homecontroller.getconfigtable()); // fill in code homecoming json(result, jsonrequestbehavior.allowget); } where

java - maven package submodule and test the parent -

java - maven package submodule and test the parent - i maven newbie. test project depends on module project (extended-java-client). need run "mvn clean package" on module path gives me extended-java-client-jar. then, need run "mvn clean install test" run test project. it's not working, didn't find module. (i added module/parent tags pom.xml file) any idea? in advance this construction of project: project *extended-java-client(module) *pom.xml (jar file) *src(the test classes) *pom.xml extended-> pom.xml <parent> <groupid>project name</groupid> <artifactid>project name</artifactid> <version>1.0-snapshot</version> <relativepath>../pom.xml</relativepath> // path main pom </parent> project-> pom.xml <modules> <module>extended-java-client</module> </modules> when build extended-java-client should

c# 4.0 - Using vb6 application in Oracle 12c database -

c# 4.0 - Using vb6 application in Oracle 12c database - i have vb6 application working using oracle 10g uses oo4o connect database. recent version (oracle 12c) has stopped supporting oo4o. trying write .dll file in c#, oracle 12c can connected. possible write .dll in c# connect vb6? please me give reference accomplish task. thanks, oracle c#-4.0 dll com vb6-migration

android - how to get photo absolute path from removable SD card -

android - how to get photo absolute path from removable SD card - background information i have been writing backup photos service, needs photo absolute paths android external storage (like photos stored in 'dcim' directory , subdirectores) , upload them remote server. problem how validate photo absolute paths android device. since there vast bulk of android devices, it`s tough ensure get-photo-absolute-path algorithm reach validate photos gallery directory , traverse photos paths within of it. now app supports uploading photos primary external storage (not secondary external storage, removable sd card). that`s say. if device has 1 emulated external storage (on-board flash), photographic camera upload service can scan photo paths on correctly. if device has removable storage (like sd card), photographic camera upload service can scan photo paths correctly well. the algorithm above scans photo paths primary external storage works correctly. when comes if

java - Certain images not getting loaded with relative path - JavaFX -

java - Certain images not getting loaded with relative path - JavaFX - i'm developing portable desktop application , ui uses images. application's absolute path is: c:/users/jp/documents/eol/collection/datacollection/src/application/ i have fxml , main class source files in application folder(specified above) , 3 images in "images" folder within application folder. .jpg files. when reference these files in fxml file using relative path, 1 gets loaded while other 2 doesn't. i don't know why 1 specific file loads while others fails load. when reference 1 file in 3 locations of fxml, works fine. , when reference 3 different images absolute paths, works fine. i'm not understanding issue relative paths respect few files. can help me this? i've tried replacing '@' "file:", didn't help. <imageview fitheight="333.0" fitwidth="450.0" opacity="0.27"> <image> <image u

php - Recursively crawl files and directories and return a multidimensional array -

php - Recursively crawl files and directories and return a multidimensional array - so i've been trying create recursive file directory tree listing function. have of except bugs. such duplicate directory names because of code not going deep plenty in tree. function ftpfilelist($ftpconnection, $path="/") { static $allfiles = array(); $contents = ftp_nlist($ftpconnection, $path); foreach($contents $currentfile) { if($currentfile !== "." && $currentfile !== ".."){ if( strpos($currentfile,".") === false || strpos($currentfile,"." === 0) ) { if(!$allfiles[$path][$currentfile]){ $allfiles[$path][$currentfile] = array(); } ftpfilelist($ftpconnection,$currentfile); }else{ if($currentpath !== "." && $currentpath !== "..") $allfiles[$path][] = $currentfile; } } } homecomi

objective c - mainScreen bounds size differs on iOS 7 vs iOS 8 upon calling willRotateToInterfaceOrientation -

objective c - mainScreen bounds size differs on iOS 7 vs iOS 8 upon calling willRotateToInterfaceOrientation - i know ios 8 returns proper screen dimensions current interface orientation. device width orientation in ios 7 had homecoming height if orientation landscape or width if orientation portrait, can homecoming width in ios 8. have taken consideration app i'm developing back upwards ios 7 , 8. (see code below) however, noticed difference. if phone call method , pass in orientation (obtained willrotatetointerfaceorientation ), on ios 7 homecoming proper width on ios 8 returns width old (current) orientation. how can width of screen when know orientation or on ios 8 , ios 7? while swap width , height ios 8, homecoming wrong value when function called while device isn't transitioning new orientation. create 2 different methods i'm looking cleaner solution. - (cgfloat)screenwidthfororientation:(uiinterfaceorientation)orientation { nsstring *reqsys

How to refer commit time of the records on BigQuery -

How to refer commit time of the records on BigQuery - range decorators of bigquery refers added time of records. references table info added between , (from https://cloud.google.com/bigquery/table-decorators) or seems have been called commit time . the timestamps compared commit time (from https://code.google.com/p/google-bigquery/issues/detail?id=160#c12) is there way know added time or commit time of records? i.e. "select thisrowcommittime(), * table", or through tabledata:list, expose timestamp each row? no, that's reasonable thing for, it's not available. you file feature request , might help there motivate farther how feature useful you. in particular: still useful if exposed info 7 days old, matching range can time-travel decorator? google-bigquery

c# - FormatException when trying to write string to database -

c# - FormatException when trying to write string to database - i writting little web application , want add together details database using web form. using asp.net , c# create web application , visual studio 2013 developing tool. using barcode scanner scan barcode product. because can not include screenshot user interface, have 3 labels, 3 textboxes (barcode,description,price), add together button , have created database save details. 3 colums in database barcode , description , price , info types varchar(50) , varchar(50) , decimal(10,2) . when run page , scan barcode exception: system.formatexception: input string not in right format. i have tried without barcode scanner , set barcode keyboard , working fine. here more details exception: server error in '/' application. input string not in right format. description: unhandled exception occurred during execution of current web request. please review stack trace more info error ,

objective c - Scrollable UIAlertView for iOS 8 -

objective c - Scrollable UIAlertView for iOS 8 - i'm trying create long, multi-line text pop in uialertview , scrollable. unfortunately it's not scrollable default. missing something? nsstring* messagestring = @"long string\nlong string\nlong string\nlong string\nlong string\nlong string\nlong string\nlong string\nlong string\nlong string\nlong string\nlong string\nlong string\nlong string\nlong string\nlong string\nlong string\nlong string\nlong string\nlong string\nlong string\nlong string\nlong string\nlong string\nlong string\nlong string\nlong string\nlong string\nlong string\nlong string\nlong string\nlong string\nlong string\nlong string\nlong string\nlong string\nlong string\nlong string\nlong string\nlong string\nlong string\nlong string\n"; uialertview *alertview = [[uialertview alloc] initwithtitle:@"long message placeholder" message:messagestring

javascript - Append variable value to form Input -

javascript - Append variable value to form Input - this question has reply here: how utilize javascript variables in jquery selectors 5 answers i need append numeric value stored in 1 variable form input fields. let's say var b= 5; var text=$("#dropdown_id").val(); i want append value of variable b in dropdown_id . my expected result #dropdown_id5 use string concatenation: $("#dropdown_id" + b).val() javascript jquery html

python - Prepend values to Panda's dataframe based on index level of another dataframe -

python - Prepend values to Panda's dataframe based on index level of another dataframe - below have 2 dataframes. first dataframe (d1) has 'date' index, , 2nd dataframe (d2) has 'date' , 'name' index. you'll notice d1 starts @ 2014-04-30 , d2 starts @ 2014-01-31. d1: value date 2014-04-30 1 2014-05-31 2 2014-06-30 3 2014-07-31 4 2014-08-31 5 2014-09-30 6 2014-10-31 7 d2: value date name 2014-01-31 n1 5 2014-02-30 n1 6 2014-03-30 n1 7 2014-04-30 n1 8 2014-05-31 n2 9 2014-06-30 n2 3 2014-07-31 n2 4 2014-08-31 n2 5 2014-09-30 n2 6 2014-10-31 n2 7 what want prepend before dates d2, utilize first value d1 populate value rows of prepended rows. the result should this: value date 2014-01-31 1 2014-02-30 1 2014-03-30 1 2014-04-30 1 2014-05-

JQUERY - Show hidden div on TABLE mouse over -

JQUERY - Show hidden div on TABLE mouse over - sorry little knowledge on jquery. have been seek , searching sort problem day or , have searched site answers, cant finalized solution. basically working limited ecom site, provides limited development functionality, way manipulate , alter elements utilize client side language. basically have very dirty html table generated on fly, table class , unique tr id each product. products show in own table. i wanting show hidden div when user mouse-overs table. have tried following: $(document).ready(function () { $('table.newspaper-d tr[id^=product_]').hover(function () { $(this).find("div.tools").show(); }, function () { $(this).find("div.tools").hide(); }); }); which works extent, works when hovering on div. mark of html illustration tables class , each tr has unique row of product_ - (id contactenated) ie product_134 one, product_324, product_323 etc etc <t

entity - Necessity of the @Parent annotation -

entity - Necessity of the @Parent annotation - i relooking @ objectify documentation , wondering benefit or necessity of @parent annotation is. appears keys or refs trick. way can share experience on necessity or benefit is? thanks. @parent gives 2 benefits: all entities mutual ancestor count single entity grouping in transactions. you can perform strongly-consistent ancestor queries. some useful reading here: https://cloud.google.com/appengine/docs/java/datastore/structuring_for_strong_consistency entity objectify

Magento - Add field to actions in Catalog Price Rules -

Magento - Add field to actions in Catalog Price Rules - i want add together custom field actions tab in catalog cost rules section. this did: i added these lines file app\code\core\mage\adminhtml\block\promo\catalog\edit\tab\actions.php $fieldset->addfield('custom_field', 'select', array( 'label' => 'custom field', 'title' => 'custom field', 'name' => 'custom_field', 'options' => array( '1' => mage::helper('catalogrule')->__('yes'), '0' => mage::helper('catalogrule')->__('no'), ), )); i changed version 1.6.0.4 in file: app\code\core\mage\catalogrule\etc\config.xml <mage_catalogrule> <version>1.6.0.4</version> </mage_catalogrule> i created new file name app\code\core\mage\catalogrule\sql\catalogrule_setup\upgrade-1.6.0.3-1.6.0.4.php $inst

c++ - How to return a template pack nested in other pack? -

c++ - How to return a template pack nested in other pack? - the next code works: #include <iostream> #include <list> struct base of operations {}; struct : base of operations {}; struct b : base of operations {}; struct c : base of operations {}; struct d : base of operations {}; struct e : base of operations {}; struct f : base of operations {}; template <int key, typename... range> struct map {}; // one-to-many map (mapping key range...) template <typename...> struct info {}; using database = data< map<0, a,b,c>, map<1, d,e,f> >; template <int n, typename first, typename... rest> // n has meaning in program, not shown here. void insertinmenu (std::list<base*>& menu) { menu.push_back(new first); insertinmenu<n, rest...> (menu); } template <int n> void insertinmenu (std::list<base*>&) {} // end of recursion. template <int n> std::list<base*> menu() {

web services - Webservice Testing with Specflow (BDD approach) -

web services - Webservice Testing with Specflow (BDD approach) - can test webservices using specflow or in generic way in bdd form ? please share me frameworks and/or scripts. i new whole approach , asked automate webservice testing using specflow c#. yes, specflow can test webservices - need write code it! have tried? we test our web services on range of windows , *nix platforms using specflow mix of code , scripts configure , manage our services. given mycalculatorservice running when phone call myadditionmethod 2 , 3 result 5 "given mycalculatorservice running" do need you're service , running might configuring service , copying in latest exe might using procrunner or similar start it "when phone call myadditionmethod 2 , 3" connect service in same way you're integrators would. this may 1 phone call or may few "then result 5" this may validating response previous step, or may making new calls service re

Defining tuple methods -

Defining tuple methods - here's swap function two-element tuples: fn swap<a, b>(obj: (a, b)) -> (b, a) { allow (a, b) = obj; (b, a) } example use: fn main() { allow obj = (10i, 20i); println!("{}", swap(obj)); } is there way define swap method on two-element tuples? i.e. may called like: (10i, 20i).swap() yes, there is. define new trait , implement immediately, this: trait swap<u> { fn swap(self) -> u; } impl<a, b> swap<(b, a)> (a, b) { #[inline] fn swap(self) -> (b, a) { allow (a, b) = self; (b, a) } } fn main() { allow t = (1u, 2u); println!("{}", t.swap()); } note in order utilize method have import swap trait every module want phone call method. methods tuples rust

Using active directory from command prompt - dsquery user - how to get everyone except x? -

Using active directory from command prompt - dsquery user - how to get everyone except x? - using illustration http://technet.microsoft.com/en-us/library/cc755655(v=ws.10).aspx#bkmk_7 dsquery user ou=test,dc=microsoft,dc=com -name jon what want jon. next did not work: dsquery user ou=test,dc=microsoft,dc=com -name !jon is possible cmd? i solved issue adding loop if statement. not reply such works. active-directory dsquery

c# - Code First view number of keys -

c# - Code First view number of keys - i trying utilize code first , database migration in mvc 5 project. in 1 of views have 20 keys [key] [column(order = 19)] [stringlength(3)] public string useoftools { get; set; } i error: `the index '' on table "xxx" has 20 columns in key list. maximum limit index key column list 16`. i appreciate suggestions. c# sql-server asp.net-mvc ef-code-first

php - Yii 2.0 : how to set different rules on same attribute for different scenerio -

php - Yii 2.0 : how to set different rules on same attribute for different scenerio - i need validate file field in yii 2.0. rule file field 'name' looks this. [['name'], 'file', 'skiponempty'=>false, 'extensions'=>'jpg, jpeg, gif, png', 'maxsize'=>'1024'] i have 2 scenarios insert , update. insert, need 'skiponempty'=>false , update need 'skiponempty'=>true . how can accomplish in yii 2.0? just create 2 validation rules required scenarions: [['name'], 'file', 'skiponempty'=>false, 'extensions'=>'jpg, jpeg, gif, png', 'maxsize'=>'1024', 'on'=>'insert'] [['name'], 'file', 'skiponempty'=>true, 'extensions'=>'jpg, jpeg, gif, png', 'maxsize'=>'1024', 'on'=>'update'] and in controller when initialize mod

ios - How to hide the line between items in UICollectionView -

ios - How to hide the line between items in UICollectionView - i'm writing calendar using uicollectionview. don't know why line come out this code create uicollectionview #import "monthtableview.h" #import "monthtablecollectionviewcell.h" @implementation monthtableview static nsstring *scellidentifier = @"cellidentifier"; #pragma mark - view lifecycle -(monthtableview *)initwithframe:(cgrect)frame { self = [super initwithframe:frame]; if (self) { _arr_week = @[@"日",@"一",@"二",@"三",@"四",@"五",@"六",]; [self initsubview]; } homecoming self; } -(void)initsubview { uicollectionviewflowlayout *flowlayout = [[uicollectionviewflowlayout alloc]init]; flowlayout.minimuminteritemspacing = 0; flowlayout.minimumlinespacing = 0; uicollectionview *col_month = [[uicollectionview alloc]initwithframe:cgrectmake(5, 5, self.fr

android - To Show a ViewGroup only during a certain orientation -

android - To Show a ViewGroup only during a certain orientation - i build kind of news app there list of news. when tapped, detailed news should shown. 1. if phone in portrait, details shown in activity 2. if phone in landscape, details shown alongside news list in details layout fragment in same activity. (there fragment of 'news list' , of 'details') what cannot accomplish rid of space details fragment take - if in landscape mode - in portrait mode. this because have mentioned 2 empty viewgroups container of fragments in activity layout file. i don't want create separate layout each orientation. is there way hide or lean out viewgroup if empty? relevant codes: main activity xml: <linearlayout android:id="@+id/news_list_container" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_we

How to handle masking conflicts in R package the right way? -

How to handle masking conflicts in R package the right way? - i wonder best way handle masking conflicts right way if conflicting packages not own packages. consider next example. work lot time series , typically function names quarter, year etc. used quite often. if load tis , data.table functionality of r depends on sequence packages loaded. library(tis) library(data.table) # masks: between, month, quarter, year library(tsfame) # loads tsdbi con <- tsconnect("somefame.db") # next fails when data.table loaded after tis ts1 <- tsget("somekeyinyourdb",con) and tsget tsdbi bundle not work anymore. need fork bundle , implement :: syntax? illustration might specific, question pretty general. more experienced users do? edit: need state more clearly. problem don't have chance phone call function explicitly because tsget calling function should called explicitly , assumes there's tis. edit2, adding phone call stack requested richie c

c# - Get Full Qualified Domain Name from user AD entry -

c# - Get Full Qualified Domain Name from user AD entry - this question has reply here: determine domain of user in active directory search result [duplicate] 1 reply given advertisement entry, how can total qualified domain name of user? up used ((string)directoryentry.properties["userprincipalname"].value).split('@')[1] but userprincipalname not required property, guess need fallback... i believe "cn" mandatory attribute in ad,and in experience has same value login value, can seek that. im not 100% sure though, seek , allow met know, if not delete answer. hopefully helps. c# active-directory

Android 5.0 material design style navigation drawer for KitKat -

Android 5.0 material design style navigation drawer for KitKat - i see android introduced new navigation drawer icons, drawer icon , arrow icon. how can utilize in kitkat supported apps. see google's latest version of newsstand app, has latest navigation drawer icons , animations. how can implement that? i have tried setting minsdk 19 , complilesdk 21 it's using old style icons. self implemented? you need utilize new toolbar in appcompat v21 , new actionbardrawertoggle in library well. add gradle dependency gradle file: compile 'com.android.support:appcompat-v7:21.0.0' your activity_main.xml layout that: <!--i utilize android:fitssystemwindows because changing color of statusbar well--> <linearlayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/main_parent_view" android:layout_width="match_parent"

oracle11g - error regarding rcu(repository creation utility) installation -

oracle11g - error regarding rcu(repository creation utility) installation - i installing rcu(repository creation utility). not able connect database. have given next details on database connection details: hostname: localhost port: 1521 service name: xe using sys username. using oracle 11g database xe. getting next message: unable connect database described details check hostname,port , check if listener , running i have checked every above detail , details right. have seek connect oracle 10g database xe error still there. please if can help me problem great thanks tarneet if first time install soa environment in clean os , need restart computer , oracle service start correctly.. if don't have clean os need check oracle xe installation, if can delete , re-install oracle ex , tray again. oracle11g

VBA LOOP in ORACLE SQL -

VBA LOOP in ORACLE SQL - i trying write vba run query assigned mysql when hcr_dm.hcr_dm_fact table loaded. i'm using count of distinct source in table decide if loaded. when running macro below, got error message while line, saying object doesn't back upwards property or method. i'm quite new vba, , couldn't figure out need adjusted. can 1 help me this? thanks! class="lang-vb prettyprint-override"> const cnstr = "provider = oraoledb.oracle; info source =csdpro; odbc;driver={oracle odbc driver};server=csdpro;user id=hcr_sandbox;password=******" sub fillwithsqldata(strsql string, wksht string) ' given sql query , worksheet, fills worksheet info dump of sql query results ' define variables dim cn adodb.connection dim rs adodb.recordset dim sql_count string ' set variables set cn = new adodb.connection set rs = new adodb.recordset ' connect sql server cn .connectionstring =