Posts

Showing posts from June, 2013

sql - Select most recent InstanceID base on max end date -

i trying pull memberinstance table based on max dateend. if null want pull still ongoing. using sql server. select memberinstanceid table group memberid having max(isnull(date_end, '2099-12-31')) this query above doesnt work me. have tried different ones , have gotten return separate instances, not 1 max date. below table looks like. memberid     memberinstanceid     datestart     dateend      2                      abc12                 2013-01-01   2013-12-31      4                      abc21                ...

tibco - Need Inputs on the XSD Schema -

i looking suggestions create xsd structure handle following xml format processing logic more efficient.the looping logic managed in tibco bw <line> <shipmentlinenumber>1</shipmentlinenumber> <salesorderlinenumber>1.1</salesorderlinenumber> <purchaseorderlinenumber>1</purchaseorderlinenumber> <partnumber>1ch162-510</partnumber> <modelnumber>st1000dm003</modelnumber> </line> <package packagetype="p" packagelevel="1"> <packagenumber>pwn34332</packagenumber> <shipmentnumber>105909390</shipmentnumber> <shipmentlinenumber>1</shipmentlinenumber> <partnumber>1ch162-510</partnumber> <quantity>1000</quantity> <ssccnumber>00176364909402100165</ssccnumber> </package> <package packagetype="c" packagelevel="2"> <packagenumber>cwx612432660<...

xslt - Validating xml attribute value with dynamic length -

i have following xml part: <column customerfield="title" companyfield="2241" datatype="alphanumeric" length="17" customervalue="manager sales compensation head office" companyvalue="manager sales compensation head office" remark=""/> i check xslt 2.0 customervalue doesn't exceed specified length (that present in xml). what have far this <xsl:template match="column[@companyfield='2241' , @datatype='alphanumeric' , @companyvalue[string-length()>number(@length)]]"> <xsl:copy> <xsl:apply-templates select="@*"/> <xsl:attribute name="companyvalue"> <xsl:value-of select="substring(@customervalue,1,17)"/> </xsl:attribute> <xsl:attribute name="remark">string value long.</xsl:attribute> </...

svg - Exporting Treemap chart -

we have 4 options highcharts exporting. png, jpeg, pdf & svg. when export , print image, scaling not consistent other charts. have set exporting sourcewidth 2000. exporting:{ sourcewidth:2000 } this prints image in landscape mode labels , legend hard read. there better way scale chart pdf , png image type better looking , easier read?

amazon web services - create empty folder S3 ruby SDK -

i want create empty folder in amazon s3 using ruby sdk. ive read there no folder concept in s3, theoretically create folder create empty object trailing "/" s3 = aws::s3::client.new( region: 'eu-west-1', credentials: creds) s3.put_object(bucket: "my_bucket", key: "my_folder/") doing creates empty object on bucket, if try upload file this: s3.put_object(bucket: "my_bucket", key: "my_folder/myfile") it doesnt create file in my_folder. maintains old empty object, , creates folder , file. after 2 commands bucket structure is: my_bucket/ my_folder my_folder/ my_file why happening? why create object my_folder twice? how should create empty folder later use? the amazon s3 virtual folders spring existence when key contains '/'. when browsing bucket in s3 console, scans object keys common prefixes , uses prefix show subset of bucket. given ...

asp.net - c# .Net Can I somehow format a DataSet to send as a repsonse from a website -

scenario: have c# windows desktop application request customers in database. validate on server , query database server returns either datatable or dataset. there way convert/encode datatable or dataset , send response? plan client application convert datatable or dataset , have way it! can done? you might want serializing dataset. (xml version: https://msdn.microsoft.com/en-us/library/58a18dwa%28v=vs.110%29.aspx ). search here and/or msdn options, converting json.

javascript - Get values from multiple arrays -

i've got hex colours in array. $.each(["#ff0000", "#000", "#ff6600", "#00e641"], function(i, c) { $('<input class="btns" type="button">') .css("background-color", color) .on("touch", $.proxy(funcnew, null, color)) .appendto("#subdv"); }); i want pass colour mood along hex value. how do it? ["red", "black", "orange", "soft shade"] e.g.: when #ff0000 selected want able pass word red . when #ff6600 selected want able pass word orange . you do: var ma = [["#ff0000", 'red'], ["#000", 'black'], ["#ff6600", 'orange'], ["#00e641", 'soft shade']]; $.each(ma, function(a, b){ b[0]; //hex b[1]; //color name });

uisegmentedcontrol - iOS segmented control with a little triangle on top -

Image
how can draw little triangle above selected item in uisegmentedcontrol ? know open-source extends it? (if not - pointers of how it) design should (this in bottom of screen) i don't believe there's native way that. can either find library allows it, can easily, recommend. i can think of few out of box ways approach it, here @ 2 think worth mentioning off bat: 1) use uisegmentedcontrol images. make segmented controller have height includes triangle, , have image selected , normal states shows want. normal states have rectangle of transparency on top, wide entire image , tall triangle. selected image include triangle. both images should end same width , height. 2) subclass uisegmentedcontrol , custom drawing in drawrect: . draw triangle outside (above) bounds of segmented controller, make sure set segmented controller's cliptobounds property no, layer 's maskstobounds property. if you'd more help, or other suggestions, ask.

fine uploader - Fineuploader issues with Norton AV -

we noticing users norton antivirus aren't able upload direct aws s3. there 403 error thrown on s3 url. have traced being norton users , happens in both ie , chrome here console errors request 0 https://****.s3.amazonaws.com/****.mp4?uploads failed load resource: server responded status of 403 (forbidden) custom.fineuploader-5.0.9.min.js:25 [fine uploader 5.0.9] post request 0 has failed - response code 403 custom.fineuploader-5.0.9.min.js:25 [fine uploader 5.0.9] specific problem detected initiating multipart upload request 0: 'the difference between request time , current time large.'. custom.fineuploader-5.0.9.min.js:25 [fine uploader 5.0.9] chunked upload request failed 0, chunk 0 **** used in place of real information the log messages (added after question posted) suggest issue clock drift on user's machine. it's not clear how related norton. if clock on user's machine drifts far actual time, aws reject request. you'll need sure machine...

java - Is toResponse from ExceptionMapper thread safe? -

i use resteasy in application , have simple implementation of toresponse method exceptionmapper interface. my question is: method have problems in environment massive amount of requests happening(many requests cause exception thrown)? have thread safety? i must admit still don't understand question fully. i used use exception response translation way: define exception class extends javax.ws.rs.webapplicationexception . in constructor of exception class call super constructor appropriate params, e.g. super(response.status(404).entity(errormessage).build()) what nice can use dto entity , gets translated. note don't use reasteasy. use jersey jackson. so in business logic throw exception, it's handled jaxrs , translated response. there's no place thread-unsafety ;)

npm - What is the relationship between the node_modules directory and package.json? -

is structure of dependencies in node_modules mirror of dependency tree structure found in package.json ? or performing npm install download in package.json , organize node_modules in special way? ideally package.json correspond node_modules . running npm install (with no arguments) install packages described in package.json node_modules , running npm install somepackage won't modify package.json unless use --save option. you can use npm list check if node_modules , package.json in sync. packages in package.json aren't in node_modules tagged unmet dependency , whereas packages in node_modules not in package.json tagged extraneous . also note root package.json doesn't contain full dependency tree; contains list of direct dependencies. dependencies of dependencies listed in package.json files of dependencies themselves, recursively.

Command Line and Array in Java -

i'm learning using array , command line argument java. write program convert celsius degree fahrenheit degree. started basic idea project not sure did right (i'm beginner). public class implementation { public static void main(string[] args) { { string[] days = new string[7]; days[0] = "very cold"; days[1] = "cold"; days[2] = "mild"; days[3] = "very mild"; days[4] = "warm"; days[5] = "very warm"; days[6] = "hot"; } if (args.length != 5) { system.out.println("error! please try again."); system.exit(0); } else { string name; string convert; double degree; string celsius; string fahrenheit; name = args[0]; convert = args[1]; degree = double.parsedoubl...

r - Calculating multiple average and creating columns -

i have following table. groups , ages, create following columns. create columns need calculate mean each group , calculate grand mean. calculate grandmean- mean. group1 group2 group3 age1 age2 age3 age4 diff1ag1 diff2ag1 diff3ag1 diff1ag2 diff2ag2 diff3ag2 diff1ag3 diff2ag3 diff3ag3 w q n 12 12 12 12 0.335 -0.08 -0.08 0.085 0.5 0.5 0 0.42 0.42 m q n 11 12 13 12 -0.335 -0.08 -0.08 -0.085 0.5 0.5 0 0.42 0.42 m p m 12 11 11 11 -0.335 0.08 0.08 -0.085 -0.5 -0.5 0 -0.42 -0.42 w p m 12 11 12 14 0.335 0.08 0.08 0.085 -0.5 -0.5 0 -0.42 -0.42 m p m 11 11 12 12 -0.335 0.08 0.08 -0.085 -0.5 -0.5 0 -0.42 -0.42 edit the initial dataset i.e. (...

c++ - Low RAM usage + frequent allocation/deallocation causes Linux to swap out other programs -

the program working on @ moment processes large amount of data (>32gb). due "pipelining" however, maximum of arround 600 mb present in main memory @ each given time (i checked that, works planned). if program has finished , switch workspace firefox open, example (but others), takes while till can use again (also hdd highly active while). fact makes me wonder if linux (operating system use) swaps out other programs while program running , why? i have 4 gb of ram installed on machine , while program active never goes above 2 gb of utilization. my program allocates/deallocates dynamic memory of 2 different sizes. 32 , 64 mb chunks. written in c++ , use new , delete. should linux not sufficiently smart enough reuse these blocks once freed them , leave other memory untouched? why linux kick stuff out of memory? other effect have not considered? can work arround problem without writing custom memory management system? the culprit file caching. news can disab...

c - Save word as string -

need save word , type letter letter. i know pretty easy work loop. problem don't know how word long need make function count letters first. wonder if there easier way this. current progress #include <stdio.h> int main() { char word[30]; int i; printf("enter word "); scanf("%s", word); while(word[i] != '\0') i++; printf("%c,", word[i]); // word backward ! // have no idea }

javascript - Does html() really replace html code? -

i have html code this, <form action="abc.html" method="post"> <div id = "result"> <input type="hidden" value="1" name="banner"> </div> </form> then jquery code replace content in div, var temp = "<input type='hidden' value='1' name='banner'>" $(".result").html(temp); then submit form , find there 2 values in form.banner, form.banner=1,1 do wrong? or have use clear data first use html()? lot! replace .result #result. you're trying target class, div contains id.

java - Why do people use Messaging when you can use Files and a Batch tool? -

we have 2 in-memory java components (a data grid , olap cube). we use batch processing tool load data grid, , dynamically create batch jobs when users want make updates data. thinking should extend our batch tool takes responsibility load data olap cube. in terms of data transfer, data grid should write out file, copy server olap cube runs on, , olap cube should read in file. the other option have when data grid finishes loading or applying update, sends message queue. olap cube read message, , call service on data grid pull data in. against option since not file based, means support team have trouble understanding it. so question is, why should use messaging? because if write own transaction files, have worry about: whether transaction got written file whether file got transmitted correctly, completely, or indeed @ all. whether file got read completely, , if not when stopped reading as kinds of reliablity issues concerning actual media. messaging systems y...

Why you cannot return fixed size / const array in C? -

i wonder why not possible return array in c? after all, array pointer backed size info (to make sizeof work). first thought done prevent me returning array defined on stack, nothing prevents me returning pointer on stack (gcc warns me, code compiles). , can return string literal statically storaged array of chars. way, in lunux stored in .rodata , , const array stored there (check objdump ), can return array (casting pointer) , works, afaik implementation-specific (another os/compiler may store const on stack). i have 2 ideas how implement array returning: copy value (as done structure. can return array wrapping structure!!), , create pointer automatically or allow user return const array , create contract such array should have static storage duration (as done strings). both ideas trivial! so, question why k&r did not implement that? an array not "just pointer backed size info". an array block of contiguous elements of type. there no pointer. since ...

Build LuaJIT for android. NDK. Windows -

i can't build luajit android under windows. here batch file. set ndk=c:/android-ndk-r10d set ndkabi=14 set ndkver=%ndk%/toolchains/arm-linux-androideabi-4.6 set ndkp=%ndkver%/prebuilt/windows/bin/arm-linux-androideabi- set ndkf=--sysroot %ndk%/platforms/android-%ndkabi%/arch-arm set ndkarch=-march=armv7-a -mfloat-abi=softfp -wl,--fix-cortex-a8 make host_cc="gcc -m32" cross="%ndkp%" target_flags="%ndkf% %ndkarch%" output: c:\luajit-2.0.3\src>set ndk=c:/android-ndk-r10d c:\luajit-2.0.3\src>set ndkabi=14 c:\luajit-2.0.3\src>set ndkver=c:/android-ndk-r10d/toolchains/arm-linux-androideabi-4.6 c:\luajit-2.0.3\src>set ndkp=c:/android-ndk-r10d/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/arm-linux-androideabi- c:\luajit-2.0.3\src>set ndkf=--sysroot c:/android-ndk-r10d/platforms/android-14/arch-arm c:\luajit-2.0.3\src>set ndkarch=-march=armv7-a -mfloat-abi=softfp -wl,--fix-cortex-a8 c:\luajit-2.0.3\src>make host_cc=...

windows server 2012 - setting up an SSL site with multiple bindings in IIS 8.5 -

i hoping can help. have 5 websites run off same .net code base , have different themes based on url. for example, http://site1.mydomain.co.uk set http redirect https://site1.mydomain.co.uk , have main ssl iis entry mydomain.co.uk wildcard ssl certificate , bindings https://site1.mydomain.co.uk . the issue have though when put http redirect on 1 of other urls, of them change last 1 entered. if makes sense? so, let's have finished site1.mydomain.co.uk entry , move onto site2.mydomain.co.uk. create https://site2.mydomain.co.uk binding in main mydomain.co.uk iis record , put http redirect on http://site2.mydomain.co.uk redirects https://site2.mydomain.co.uk . if go , check previous record, site1.mydomain.co.uk redirect has changed https://site2.mydomain.co.uk not wanted. why doing , how can prevent this? is there chance you're using same folder in filesystem 5 websites? in iis, http redirect settings stored in web.config file in folder you're serving...

ios - Underlining glitch -

Image
i'm trying add underlining attributed text using custom font ( helveticarounded-bold ). yet, underlining glitches both on simulator , device. this: this uilabel can reproduce problem in uitextview . appears if text renderer miscalculating draw underline, on lines. the bare-bones code: - (void)viewdidload { [super viewdidload]; uifont *font = [uifont fontwithname:@"helveticarounded-bold" size:18]; self.label.font = font; self.label.numberoflines = 0; nsdictionary *attributes = @{ nsunderlinestyleattributename : @(nsunderlinestylesingle) }; self.label.attributedtext = [[nsattributedstring alloc] initwithstring:@"this test. , test has failed. did deserve this? why nsunderlinestyleattributename? why?" attributes:attributes]; } fun fact: underlining not glitch @ size 24 or above (!). not repro using tttattributedlabel . any idea might going on here? it appears glitch o...

cgi - Trouble Storing arguments from Query string in C++ -

i'm trying parse query string , store each argument in specific string (such apr), i'm having hard time figuring out. right able display each argument url like: ...assign09.cgi?apr=2&term=4&amount=7. able '2' '4' , '7' out of this, whenever try assign value string, internal server error. also, think running off of string because '?' @ end of output loop. my main question is: way parse query string want? #include <iostream> #include <string> #include <cstdlib> using namespace std; int main () { cout << "content-type:text/html\r\n\r\n"; string s = getenv("query_string"); string apr; string loanterm; string loanamount; string monthlypayment; // apr, loanterm, , monthlypayment string args[3]; cout << "<html>\n"; cout << "<head>\n"; cout << "<title>hello world - first cgi program</title>\n...

C++ Error using a custom ifstream class with a variable as argument -

i using custom ifstream class class plb_ifstream : public parallel_istream { public: plb_ifstream(); explicit plb_ifstream(const char* filename, std::istream::openmode mode = std::ostream::in ); ~plb_ifstream(); virtual std::istream& getoriginalstream(); bool is_open(); void open(const char* filename, std::istream::openmode mode = std::ostream::in); void close(); bool good(); private: plb_ifstream(plb_ifstream const& rhs); plb_ifstream& operator=(plb_ifstream const& rhs); private: devnullbuffer devnullbuffer; std::istream devnullstream; std::ifstream *original; }; this works single file like plb_ifstream ifile("geometry.dat"); however when try use variable in argument (in for-loop) like for(plint num=1; num<4; num++) { std::ostringstream ostr; ostr <<num<<".dat"; std::string var = ostr.str(); pcout <<"reading geometry.."<<endl; plb_ifstream ifile(ostr.st...

php - How to close a popup when a button is pressed? -

i want close page when button pressed. i'm using script add_address.php output list of email addresses message box , want output email addresses text box in send.php script here code add_address.php: <!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>add email addresses...</title> </head> <body> <form action="send.php" method="post"> <table> <tr> <td><textarea name="message" cols="50" rows="20"></textarea></td> </tr> <td colspan="2" align="left"> <input type="submit...

java - Having trouble creating Card class -

im having trouble converting r[rank] string. eclipse keeps saying needs resolved array. having trouble cards[13*i + j] = new card(i, j); keeps saying cannot resolved variable. heres code... public class card { private string suit; private string rank; private static string[] s = { "hearts", "spades", "diamonds", "clubs" }; private static string[] r = { "ace", "2", "3", "4", "5", "6", "7", "8", "9", "10", "jack", "queen", "king" }; public card(int suit, int deck){ for(int = 0; < 4; i++) { for(int j = 0; j < 13; j++){ cards[13*i + j] = new card(i, j); } } } public card(string r, string s, string suit){ for(int rank = 0; rank < r.length(); rank+=1){ if( rank.equals(r[rank]) ){ this.ra...

sqlite3 - SQLite query in Android does not return correct values -

the following query not return value sellingprice though in database. returns value other fields, except sellingprice. select itemid, unitid, itemdesc, unitdescription, case ? when 1 sellingprice1 when 2 sellingprice2 when 3 sellingprice3 when 4 sellingprice4 when 5 sellingprice5 end sellingprice items companyid = ? order itemdesc, unitdescription if substitute ? 2 , 7, returns value sellingrice select itemid, unitid, itemdesc, unitdescription, case 2 when 1 sellingprice1 when 2 sellingprice2 when 3 sellingprice3 when 4 sellingprice4 when 5 sellingprice5 end sellingprice items companyid = 7 order itemdesc, unitdescription here how execute query cursor = dbcontext.rawquery(query, new string[] {integer.tostring(pricelevel), integer.tostring(companyid)}); and here how traverse returned cursor if (cursor.movetofirst()) { { log.i("item desc", cursor.getstring(2)); log.i("sellingprice", double.tostring(cursor.getdouble(4))...

osx - how to fix mksdcard error on Android Studio Setup on Mac? -

how fix error on running android studio setup on mac osx10.7.5 "unable run mksdcard sdk tool. 1 common reason failure missing required libraries please fix underlying issue , retry." the mksdcard utility distributed recent versions of android sdk compiled in way won't run on os x versions older 10.8. can replace mksdcard older copy of utility that's known work on os x 10.7.5, such 1 in http://dl-ssl.google.com/android/repository/tools_r22.6.2-macosx.zip . credit due: solution iamsme's answer similar question , found via googling "illegal instruction 4" after got error message when hunch led me test mksdcard on command line.

Creating album for mysql and php online photo album -

i creating mysql backed online photo album , using php access mysql database, having trouble trying create form lets users create new album, far have following code: <h1>my photo collection</h1> <h3>add, search , browse through our collection!</h3> <section id="collection"> <h4>create album</h4> <form method='post'> <?php require_once 'config.php'; $mysqli = new mysqli(db_host, db_user, db_password, db_name); if(isset($_post['title'])){ $name = $_post['title']; if(empty($name)){ echo "please enter album name <br/>"; } else{ $mysqli->query("insert albums values('', '$title')"); echo "album created <br/>"; } } ?> album name: <input type="text" name="title" /> <input type="submit...

ruby on rails - Devise Confirmable. How to remove email field? -

in order send new confirmation instructions, email has entered. want avoid because users logged in @ moment, there's no need email asking. want send new instructions current_user.email i don't want client side stuff this: = f.email_field :email, value: current_user.email, class: "hidden" i need server side solution. thanks guys! as per devise codebase , sending confirmation email can invoked on user follows: user = user.find(1) user.send_confirmation_instructions so don't need email form.

javascript - Sessions for cordova app? -

so have sessions configured this. app.use(session({ store: new redisstore(), key: 'localhost.sid', secret: 'keyboard cat', cookie:{ domain: '.localhost.io' } })); that works main app, looks cordova conflict , not save cookie cordova app. when remove key , store , , cookie seems work well. is there way use boolean evaluate if on site or on app? you shouldn't use cookies in cordova app. use token-based authentication instead. check out: https://auth0.com/blog/2014/01/07/angularjs-authentication-with-cookies-vs-token/

oracle - SQL data convert column to row values -

i have table 1 column 100 rows of names. need display 3 names in row. 34 rows each row 3 names. example: name _____ raj sam guru tej avin sami fanst i need display above data as name name1 name2 ____ _____ ______ raj sam guru tej avin sami fanst no condition need covert single column value 3 columns data. oracle db you can using conditional aggregation , rownum. this: select max(case when mod(rn, 3) = 1 name end) name1, max(case when mod(rn, 3) = 2 name end) name2, max(case when mod(rn, 3) = 0 name end) name3 (select name, rownum rn table t ) t group trunc((rn - 1) / 3);

sql - Column 'ID' is constrained to be unique. Value is already present -

i constraint error not understand. system.data.constraintexception: column 'id' constrained unique. value '01d3eb89-f4e1-4782-9519-da8f08e0638f' present. the value repeated in member data - not see how constrained unique. the query select memberdata.userid, memberdata.formrow, memberdata.value authusers, memberdata (authusers.groupid = @groupid , authusers.id = memberdata.userid , memberdata.formid = @formid) group memberdata.userid, memberdata.formrow, memberdata.value authusers asp.net user table groupid field added guid. memberdata data form data. has formrow (guid) - points form definition row in formrow value (string) id (int) - unique auto-increment key userid (string) - userid authuser table formid (guid) - points form definition in forms memberdata has memberdata.userid repeated each formrow , user's form data collection. memberdata.formrow has many repeated every different userid , each user's data fo...

c++ - Compiler flag to include some_file_name.h into all files? -

i working on honors thesis , want change threading method std::threads include boost::threadpool. able accomplish doing #include "../include/threadpool.hpp" within each of files, becomes repetitive many files / changes thread systems. there way give compiler flag (or else) files natively #include file? my naive thought like //dependencies.h #include "../include/threadpool.hpp" #include //some other dependency need.h and pass a -i "path_to_dependencies.h" flag compiler. work or off base? thanks! the latter preferred way it. in fact can go 1 step farther , make precompiled header, cut down compilation time lot , if project gets large. i assume you're using gcc, can read precompiled headers here: https://gcc.gnu.org/onlinedocs/gcc/precompiled-headers.html for microsoft's compiler have stdafx.h file knows since enables precompiled headers default.

ios - Convert code from Objective C to Swift for FactualSDK -

this first question on stack overflow, integrating factual sdk in app using swift. created bridgeheader framework not figure out how convert line of code in order set authkey , id in swift. in advance!! factualapi* _apiobject = [[factualapi alloc] initwithapikey:@"yourkey" secret:@"yoursecret"]; try this: let _apiobject = factualapi(apikey:"yourkey" secret:"yoursecret") i tested , working fine.

Point-In-Time Cassandra backup & recovery -

i have read cassandra backup & recovery here, , have few questions: do native cassandra cli commands suffice? see lot of people writing scripts , custom-making own solutions. what other tools out there recommend cassandra backup , recovery? looking can me manage backup images (e.g. point-in-time) do need invest more storage if opt backup cassandra tables? any insights appreciated. please try limit questions 1 actual question. do native cassandra cli commands suffice? i assume mean nodetool snapshot , most-part, "yes." in addition, many users choose enable incremental backups . combination of using snapshots , incremental backups (from linked doc) " provides dependable, up-to-date backup mechanism. " i see lot of people writing scripts , custom-making own solutions. i have backup script runs on nodes nightly. there 2 reasons this. i don't want have manually take snapshot each keyspace every week, have script it. s...

uislider - Slider in li using jquery -

this code working next prev not gives smooth sliding effect. please make smooth. have variours list data need shown in slider effect next prev button. $(document).ready(function () { $('#prev').hide(); var $lis = $("#mylist li").hide(); $lis.slice(0, 10).show(); var size_li = $lis.length; var x = 10, start = 0; if(size_li == x) { $('#prev').hide(); $('#next').hide(); } $('#next').click(function (e) { e.stoppropagation(); $('#prev').show(); if (start + x < size_li) { $lis.slice(start, start + x).hide(); start += 1; $lis.slice(start, start + x).show(); } if(start + x == size_li) { $('#next').hide(); } }); $('#prev').click(function () { $('#next').show(); if (start >= 1) { $lis.slice(start, start + x).hide(); start -= 1; $lis.slice(start, start + x).show(); } if(start == 0) ...

android - No action After click on Button -

i created 1 button in android app,but when clicking on button,nothing happens. protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_search_data); search =(button)findviewbyid(r.id.search); search.setonclicklistener(new view.onclicklistener() { public void onclick(view v) { try { new retrievedata().execute(); } catch (exception e) { e.printstacktrace(); } } }); } try initialize button in oncreate();

Password failing using Bcrypt -

so far bcrypt has had no problems until now. reason following password won't work. uio78349%^&(]\\';= first time i've had password not work , hope has explanation. hunted net , read character limit below that. not sure if makes difference user input password going through mysqli_real_escape_string. first batch of code login form located: <?php session_start(); ?> <html> <body> <form method="post" action="sidebar-signin-block.php"> <table width="90%" border="0" align="center" bgcolor="white"> <tr> <td bgcolor="ffffff" colspan="2" align="center"><h2>user login</h2></td> </tr> <tr> <td align="right">email:</td> <td><input type="text" name="email"></td...

nlp - How to represent Dependency Triplets in .arff file format? -

i'm developing classifier text categorisation using weka java libraries. i've extracted number of features using stanfords' corenlp package, including dependency parse of text returns string "(rel, head, mod)". i wanting use dependency triplets returned features classification cannot figure out how represent them in arff file. basically, i'm stumped; each instance, there arbitrary number of dependency triplets, can't define them explicitly in attributes, example: @attribute entitycount numeric @attribute deptriple_1 string @attribute deptriple_2 string . . @attribute deptriple_n string is there particular way go this? i've spent better part of day searching , have not found yet. thanks lot reading. extracted weka wiki: import weka.core.attribute; import weka.core.fastvector; import weka.core.instance; import weka.core.instances; /** * generates little arff file different attribute types. * * @author fracpete */ public class ...

ruby on rails - ActiveRecord touch causing deadlocks -

my app uses touch extensively in order take advantage of rails' template caching system. there's type of work app when many relationships created between many different objects in batch. sometimes, of work results in resulting cascading touch es causing deadlock. i can code around 1 scenario seeing happen often, seeing has brought light larger problem, happen in other scenarios, albeit it's unlikely. to understand this, think 2 people following 1 on twitter @ same moment. both click "follow", resulting in relationship objects being created between them , each of records being touch ed. if these touches become interweaved: process 1 touches user a process 2 touches user b process 1 touches user b process 2 touches user a each process using database transaction, result in deadlock. am wrong happen in normal app operation outside of weird batch job scenario? if i'm not wrong, there solution? can somehow move touch es outside of transactions? (...

high availability - Hadoop about HA, stop one active node,but another standby can not convert to active state -

i have configured core-site.xml , hdfs-site.xml ha. , test on website. stoped 1 active node(hadoop-daemon.sh stop namenode), standby can not convert active state.the standby node became active state when restart node. ha not work.i not know why.

asp.net - .NET 4.5 Gridview with DropDownList in EditItemTemplate UpdateMethod -

i have gridview list of manufacturertypes related manufacturers... each manufacturertype has manufacturer (2 tables -> 2 entities). when want update item manufacturertype wan`t possible update title entity manufacturertype change (manufacturer) relation if dropdownlist selectedvalue change. <asp:gridview id="gvmanufacturertypes" runat="server" datakeynames="manufacturertypeid" autogeneratecolumns="false" gridlines="vertical" cssclass="gridview" cellpadding="4" itemtype="entities.models.manufacturertype" selectmethod="getmanufacturertypeswithparams" updatemethod="updateitem" deletemethod="deleteitem" allowpaging="true" allowsorting="true" pagesize="20" pagersettings-firstpagetext="prvi" pagersettings-lastpagetext="zadnji" pagersettings-mode="numericfirstlast" ...

html - CSS :first-child pseudo-element -

why code not working intended? background-color of first article must green. how can without classes or id? p.s. i'm sorry post needs more text. i'm sorry post needs more text. <!doctype html> <html> <head> <meta charset="utf-8"> <title>stack</title> <link rel="stylesheet" href="css/style_new.css"> </head> <body> <section> <h1>this h1 header</h1> <article> <p> lorem ipsum dolor sit amet lorem ipsum dolor sit amet lorem ipsum dolor sit amet lorem ipsum dolor sit amet lorem ipsum dolor sit </p> </article> <article> <p> lorem ipsum dolor sit amet, consectetur adipisicing elit, sed eiusmod tempor incididunt ut ...

sql server - Error converting data type nvarchar to bigint in C# -

Image
stored procedure alter procedure [dbo].[spinsertloanmaster] @tac_no bigint ,@tacc_no bigint ,@tac_name nvarchar(50) ,@tv_no bigint ,@tjlg_no bigint ,@tpost_no bigint ,@tphone_no1 bigint ,@tact_no bigint ,@tloan_amt bigint ,@tloan_date date ,@tint_rate bigint ,@tpay_mode nvarchar(max) ,@tprin_inst nvarchar(max) ,@tguar_name1 nvarchar(50) ,@tguar_name2 nvarchar(50) ,@tchq_no bigint ,@tchq_date date ,@tguradd1 nvarchar(100) ,@tguradd2 nvarchar(100) ,@tgurphone1 nvarchar(100) ,@tgurphone2 nvarchar(100) ,@tperiodinyear nvarchar(100) ,@tperiod nvarchar(100) begin -- set nocount on added prevent result sets -- interfering select statements. set nocount on; -- insert statements procedure here insert loan_master (ac_no,acc_no , ac_name,v_no,jlg_no,post_no,act_no,phone_no1,guar_name1,guradd1,gurphone1,guar_name2,guradd2,gurphone2,loan_amt,loan_date ,int_rate,periodinyear,pay_mode,prin_inst,chq_date ,chq_no,period)values ( @t...