Posts

Showing posts from September, 2015

compiler construction - Adding the inreg attribute to LLVM IR function parameters -

i'm working llvm , want recreate piece of ir api: declare void @fun(i32* inreg, i32 inreg) but can't seem it. my current attempt is: function* fun = cast<function>(m.getorinsertfunction("fun",type)); ((fun -> getattributes()).getparamattributes(0)).addattribute(c,0,attribute::inreg); ((fun -> getattributes()).getparamattributes(1)).addattribute(c,0,attribute::inreg); this code literally doesn't after line 1, lines 2 , 3 ignored , in ir output is: declare void @fun(i32* , i32 ) how work correctly? managing function attributes in llvm quite inconvenient attributes packed immutable , global sets. assigning attribute function argument means replacing set representing function , argument attributes new one. fortunately, there @ least helper functions makes job bit easier. suggest using llvm::function::addattribute() method. function* fun = cast<function>(m.getorinsertfunction("fun", type)); fun->addattrib

c++ empty queue initialization isn't empty in Qt creator -

so queue not empty , there random number of elements filled in. reason why program crashes if try push element onto queue. output cerr statements in calculator.cpp : 0 12163576194217602005 calculator.cpp: void calculator::insertzero(){ cerr << input.empty(); cerr << input.size(); //input.push(0.00); } calculator.hpp: #ifndef calculator_h #define calculator_h #include <qstring> #include "widget.h" #include "ui_widget.h" #include <queue> #include <iostream> /* * class holds declarations of calculator. */ using namespace std; class calculator{ private: queue<double> input; queue<double> result; qstring display; public: //numbers void insertzero(); }; #endif // calculator_h widget.h: #ifndef widget_h #define widget_h #include <qwidget> #include <qstring> #include <qpushbutton> #include <qlabel> #i

mongodb - MongoEngine - How to deference a List Field efficiently when converting to json -

class parent(document): name = stringfield() children = listfield(referencefield('child')) class child(document): name = stringfield() parents = listfield(referencefield(parent)) @app.route('/home/') def home(): parents = parent.objects.all() return render_template('home.html', items=parents) i have 2 collections similar above, maintain many many relationship. in template angular, i'm setting javascript variable list of parents so: $scope.items = {{ parents|tojson }}; this results in array of parents who'se chilren array of object ids (references), opposed dereferenced child objects: $scope.items = [{'$oid': '123', 'name': 'foo', 'children': [{'$oid': '456'}]}]; i want angular object contain of dereferenced children. there efficient way this? so far, approach works me, @ o(n^3). i've minimized list comprehensions clarity. multiple obj['_id']

javascript - Starting with AngularJS using a ng-controller directive -

i'm trying make simple exercise doesn't work. think don't call controller variable appropriately. blocked. how can fix code? result page show me: {{dish.name}} {{dish.label}} {{dish.price | currency}} <html lang="en" ng-app="a"> <head>.... </head> <body> <div class="container"> <div class="row row-content" ng-controller="dishdetailcontroller dishdc"> <div class="col-xs-12"> <p>put dish details here</p> <div class="media-body"> <ul class="media-list"> <li class="media" ng-repeat="dish in dishdc.dishes"> <div class="media-left media-middle"> <a href="#"> <img class="media-object img-thumbnail"

winforms - Notification icon transparency issues when dragging -

Image
i have winforms app, major component of icon down in notification area. i've noticed if drag icon (to reorder it, or move to/from list of icons hidden windows) transparent pixels not respected correctly, unlike other icons. this illustrated in animation below; other icons ok when dragged, icon (the red circle) not (excuse animation's compression artefacts). looking @ more closely, icon looks this: looks when dragged: a notifyicon control used, , icon generated dynamically in various colours , different numbers overlaid. in order maintain translucency around edges of icon, png format used (using code sample codeproject ) take bitmap , return icon used notifyicon : private static readonly byte[] _pngiconheader = { 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; using (var bmp = new bitmap(image, new size(image.width, image.height))) { byte[] png; using (var ms = new memorystream()) { bmp.save(ms, imageformat.png)

c++ - Assinging pointer to string variable fails -

match give_word( const vector< vector<string> > * source_words, const vector< vector<string> > * target_words, ...) { string synonym1, synonym2; ... // choose synonyms (if available) synonym1=source_words[index][rand()%source_words[index].size()]; synonym2=target_words[index][rand()%target_words[index].size()]; ... i've made technical decision pass vector-in-vector objects pointers because don't want them copied , passed function. it's because vectors hold more 1000 strings. but don't understand why compile error @ 2 lines assignment sign (=) synonym1=source_words[index][rand()%source_words[index].size()]; synonym2=target_words[index][rand()%target_words[index].size()]; it says this: no operator "=" matches these operands synonym1 = source_words[index][rand() % source_words[index].size()]; synonym2 = target_words[index][rand() % target_words[index].size()]; would valid code if used

java - Mock: when() requires an argument which has to be 'a method call on a mock' -

i writing unit tests rest-api , have problems entities creation mocking. don't know how can mock entitymanager. tried example below got error. my controllertest: public class mcontrollertest { private mockmvc mockmvc; @injectmocks a; @injectmocks b b; @injectmocks acontroller acontroller; @injectmocks private aserviceimpl aserviceimpl; @autowired webapplicationcontext webapplicationcontext; @autowired private filterchainproxy springsecurityfilterchain; @autowired @injectmocks private entitymanagerfactory entitymanagerfactory; @before public void setup() { mockitoannotations.initmocks(this); mockmvc = mockmvcbuilders.webappcontextsetup(webapplicationcontext) .addfilter(springsecurityfilterchain) .build(); } @test public void postatest() throws exception { a.setdddd("xxx"); entitymanagerfactory entitym

c# - Deserializing .NET Dictionary using ISerializable -

i have problems getting de-/serialization of dictionary working when implementing iserializable in enclosing class. seems able automatically de-/serialize if apply serializableattribute. need check deserialized dictionary in process however, need iserializable working. i set little test sure wasn't due other problems. test class looks this: [serializable] class test : iserializable { private dictionary<string, int> _dict; public test() { var r = new random(); _dict = new dictionary<string, int>() { { "one", r.next(10) }, { "two", r.next(10) }, { "thr", r.next(10) }, { "fou", r.next(10) }, { "fiv", r.next(10) } }; } protected test(serializationinfo info, streamingcontext context) { // here _dict.count == 0 // found dictionary no content? _dict = (dictionary<string, int&g

php - How to get the column name of the cell which returned by result::fetch_row if I use foreach on it? -

i have created simple php code print result of mysqli query no matter query , how many columns , rows in there. simplified php code is: $result = $mysqli->query ($query); while ($row = $result->fetch_row()) { if ($row["status"] == "0") continue; foreach ($row $cell) { echo $cell; } echo "\n"; } now want omit column (ex: column named "status") printed, have include column "status" in query because need check "status" value determine whether if entire row printed or not (the check little more complicated , it's impractical on query itself). if row printed, don't want column "status" printed along in table. have no means know whether $cell inside foreach named "status" or not, , have several other columns have similar value "status" can't check based on value either. how can this? i've read on php mysqli::fetch_row() manual doesn't seem each of $ce

c++ - g++ - Finding appopriate Windows libraries to link so as to compile FANN library -

for various reasons have been trying compile fann library myself. i'm on windows 10 mingw. keep things simple going start with: g++ mushroom.c -o shroom.exe -lm -i src\ -i src\include\ src\doublefann.c ( mushroom.c includes <stdio.h> , "fann.h" .) using -i src\ -i src\include\ src\doublefann.c allowed me rid of various undefined reference errors resulting header files not being found, keeps throwing following undefined reference: doublefann.c:(.text+0x4ee9): undefined reference gettickcount() fyi, appears in fann.h (line 54): /* compat_time replacement */ #ifndef _win32 #include <sys/time.h> #else /* _win32 */ #if !defined(_msc_extensions) && !defined(_inc_windows) extern unsigned long __stdcall gettickcount(void); in short, seems error linking windows libraries, , don't know how proceed find relevant ones link. here full fann.h , full doublefann.c disclaimers , notes edit: since going bed last night, refine

Silex Setting Middleware to a ControllerCollection -

i want this: $app->mount('dashboard', new travel\controllers\dashboard())->before(function() use ($app) { //check if logued... }) is possible? thanks! you can $controllers = $app["controllers_factory"]; $controllers->before(function(request $request){}); in controllerproviderinterface::connect method if need function defined in $app definition php file can create protected function $app['callback'] = $app->protect(function(){}); then $controllers->before($app["callback"]);

Makefile: read input variable and set several variables -

i have makefile want read file name input , make other names based on it`s name. have tried following code mlext = .ml testext = test.ml nativeext = test.native test: @read -p "enter file name: " file; \ echo $$file$(mlext); \ echo $$file$(testext); \ echo $$file$(nativeext) for example: if type: foo then want foo.ml , footest.ml , footest.native however, can foo.ml . rest 2 .ml , .native how can fix this? first, let see exact recipe given shell removing @ in makefile: read -p "enter file name: " file; \ echo $file.ml; \ echo $filetest.ml; \ echo $filetest.native; the issue content of $(testext) gets appended $$file , creating shell variable $filetest , (very probably) not exist, resulting in empty string in end. not occur $(mlext) , initial dot cannot part of variable name. to overcome this, use $${file} instead of $$file in makefile rule.

java - How to bring JLabels in GridBagConstrains at top -

Image
i trying code, , reason, appears in middle. here's code: string errormsg = "something went wrong."; final string title = "wall game"; this.setsize(400, 500); //sets screen this.setdefaultcloseoperation(jframe.exit_on_close); this.settitle(title); this.setvisible(true); this.setsize(401,501); try { font font1 = new font("comic sans ms", font.bold, 15); jpanel panel1 = new jpanel(new gridbaglayout()); //makes panels jlabel label1 = new jlabel("welcome wall game!"); //labels jlabel label2 = new jlabel("click button read instructions!"); jbutton button1 = new jbutton("start");//buttons button1.settext("start!"); label1.setfont(font1); button1.setlayout(new boxlayout(button1, boxlayout.y_axis)); gridbagconstraints gbc = new gridbagconstraints(); gbc.insets = new insets(15,10,10,10); gbc

php - How to preg_match all style tags? -

this question has answer here: how parse , process html/xml in php? 27 answers regex match open tags except xhtml self-contained tags 35 answers how safe match all <style> blocks in body using preg_match_all()? google not friend today. $haystack = '<body> <style> .class { foo: bar; } </style> <p>hello world</p> <style> /* comment <p> */ .class > p { this: that; } </style> <p>some html</p> </body>'; preg_match_all('#<style>([^<]+)#is', $haystack, $matches, preg_set_order); var_dump($matches); preg_match_all('#<style>(.*)</style>#is', $haystack, $matches, preg_set_order); var_dump($matches); did not work, matched < in style comment. reg

arrays - C program skipping over user input? -

i'm making program takes input user of how many numbers want in array , numbers in arrays compare 2 find unions in intersections. i have written reason after user inputs how many numbers want , numbers first array(a), skips entire user input second array(b). the computations union , intersection correct(not shown) can't figure out i'm missing. i'm quite new @ c there minor issue i'm missing. thanks help! int main(void){ int i, j, x, y; int elema, elemb; int a[10] = {0}; int b[10] = {0}; // prompts user enter amount of numbers in array // asks user enter values (0-9) inputted. printf("enter number of elements in set a: \n"); scanf("%d", &elema); printf("enter %d number(s) set a: \n", elema); scanf("%d", &x); if(x < 10) a[x]=1; // sets index in array 1 if //corresponding number has been inputted // prompts user enter

php - naming Laravel events, listeners and Jobs -

i have event called userwasregistered have listener called userwasregistered there intned develop job commands called: emailregistrationconfirmation notifyadminsnewregistration createnewbillingaccount all these jobs executed within userwasregistered event listener class. is correct approach or should have multiple listeners userwasregistered ? feel using jobs approach enabled me call "jobs" other areas in application @ different times. e.g. calling createnewbillingaccount might called if user changed details...? i recommend change listener names that's more explicit what's happening, i'd avoid directly pairing listeners events. we're using anemic event/listener approach, listeners pass actual task "doers" (jobs, services, name it). this example taken real system: app/providers/eventserviceprovider.php : orderwaspaid::class => [ provideaccesstoproduct::class, startsubscription::class,

How do I store information about a many-to-many relationship without the concept of a join table in Firebase? -

my firebase app contains many-to-many relationship between groups , users. i'd store information when user joined group - how go without concept of join table? i'm using firebase example reference: https://examples-k9xbyc0bhfwtlkdgfhs.firebaseio-demo.com/ do recommend doing this? app: { groups: { group1: { members: { user1: { joindate: '2016-01-22t02:43:27.817z', iscreator: true }, user2: { joindate: '2016-01-23t02:43:27.817z', iscreator: false } } } }, users: { user1: { firstname: 'adam', lastname: 'soffer', groups: { group1: { joindate: '2016-01-22t02:43:27.817z', iscreator: true } } }, user2: { firstname: 'joe', lastname: 'shmoe', groups: { group1: { joindate: '2016-01-23t02:43:27.817z', i

VB.net mySQL How to use DateAdd in sql query -

i'm getting error when form load , said function databasename.dateadd not exist con.open() cmd.connection = con cmd.commandtext = "update pawn set status = 'renewed', date_added = dateadd(month,4,date_added), first_date = dateadd(month,5,first_date), second_date = dateadd(month,6,second_date), due_date = dateadd(month,7,due_date)" dr = cmd.executereader con.close() you've used vb.net's dateadd() inside query won't work mysql because mysql doesn't has inbuilt function syntax mysql date add function date_add(date,interval expr type) cmd.commandtext = "update pawn set status = 'renewed' " & _ ",date_added = date_add(date_added,interval 4 month)" & _ ",first_date = date_add(first_date,interval 5 month)" & _ ",second_date = date_add(second_date,interval 6 month)" & _ ",due_date =

App crashes despite handling Android M GPS permission -

i have been using android m model time now, manually revoked permissions location , storage in mobile settings see whether app ask user again permissions @ run time. since then, been crashing. please have @ code- public class mapsactivity extends fragmentactivity implements com.google.android.gms.location.locationlistener, googleapiclient.connectioncallbacks, googleapiclient.onconnectionfailedlistener { string[] perms={"android.permission.access_fine_location","android.permission.write_external_storage"}; int permsrequestcode = 200; @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); mgeofences = new arraylist<geofence>(); mgeofencecoordinates = new arraylist<latlng>(); // double string0=prefencesettings.getstring("latlng0", "34"); setcontentview(r.layout.activity_maps); showhelpforfirstlaunch(); supportm

Vertical dotted line in between a column in html table -

Image
i have created html table shown below: now want draw vertical dotted line in between column in table. see can me this? here code row 1 : #myprogress { height: 20px; position: relative; border: 1px solid #ccc; background-color: #4675a1; display: inline-block; } <tr> <td align="center">1</td> <td>2014-03-05</td> <td>2014-03-05-m01117</td> <td><div class="col-xs-3">32</div></td> <td><div class="col-xs-4"><div style="width: 200px;"><div id="myprogress" style="width:10%"> </div> </div></div></td> <td>78.3</td> </tr> do check below html , css add vertical line in html table .myprogress { height: 20px; position: relative; border: 1px solid #ccc; background-color: #4675a1; display: inline-block; } .borde

ios - The app always shows me the answer of the first -

i made calculator converts units of measurement. app shows me answer of first (km), unless whole answer. hope 1 of find mistake. class viewcontroller: uiviewcontroller, uipickerviewdelegate, uipickerviewdatasource { @iboutlet var label: uilabel! @iboutlet var picker1: uipickerview! @iboutlet var num: uitextfield! var array1 = ["km","m","dm","mm"] var placeanswer = 0 var answer = float() override func viewdidload() { super.viewdidload() } override func didreceivememorywarning() { super.didreceivememorywarning() } func pickerview(pickerview: uipickerview, titleforrow row: int, forcomponent component: int) -> string? { return array1[row] } func pickerview(pickerview: uipickerview, numberofrowsincomponent component: int) -> int{ return array1.count } func numberofcomponentsinpickerview(pickerview: uipickerview) -> int{

c# - Can I use a normal foreach on a ConcurrentBag? -

in parallel section of code, save results each thread concurrentbag. however, when complete, need iterate through each of these results , run them through evaluation algorithm. normal foreach iterate through members, or need special code? i've thought using queue instead of bag, don't know best. bag typically contain 20 or items @ end of parallel code. ie, access , run foreach members of concurrentbag? concurrentbag futures = new concurrentbag(); foreach(move in futures) { // stuff } you don't need special code, c#'s foreach call "getenumerator" which gives snapshot : the items enumerated represent moment-in-time snapshot of contents of bag. not reflect update collection after getenumerator called.

pointers - c++ push_back copying object instead of reference -

i'm having issues understanding problem i've mentioned in comments below: class node { public: node(int value): value(value), neighbors() {} int value; std::vector<std::shared_ptr<node>> neighbors; }; std::vector<node> nodes; nodes.reserve(50); for(int j = 0 ; j < 50; ++j) { nodes.push_back(node(j)); } for(int j = 1 ; j < 25; ++j) { nodes.at(0).neighbors.push_back(std::make_shared<node>(nodes.at(j))); } //the following line copying nodes.at(0) instead of //copying reference nodes.at(0). why? nodes.at(15).neighbors.push_back(std::make_shared<node>(nodes.at(0))); for(int j = 25 ; j < 50; ++j) { nodes.at(0).neighbors.push_back(std::make_shared<node>(nodes.at(j))); } std::cout << nodes.at(15).neighbors.at(0).neighbors.size(); //prints out 24 std::cout << nodes.at(0).neighbors.size(); //prints out 49 wh

java - Efficient way of storing and matching names against large data sets -

for data loss prevention tool, have requirement need lookup different types of data such driver's license number, social security number, names etc. while of pattern based , hence looked using pattern matching regular expressions, name happens broad category. there virtually set of characters form name. however, make meaningful lookup, think should lookup them against defined dictionary of names. here thinking. provide dictionary of names configuration item. looks more sensible each use case, names might vary different geographic regions. looking best practices doing in java. these questions- what data structure store names. set comes mind first option, there better options in memory databases. how should go searching these names in large data sets. these data sets large , have facility read them row row. any other option? take @ concurrent-trees , cqengine projects.

TypeScript - How can I access "this" in async method -

i have piece of code: export class profile { private resource: resource = new resource(); /** * problem here */ async initialize(): promise<void> { console.log(this.resource); var html = await this.resource.fetch(true); const $profile = jquery(html); console.log($profile.find("span.largetext")); } } if can see line console.log(this.resource) , undefined. can't async methods access "this"? i tested console.log(this) , , returns profile { } in web inspector. is there way can access this ? class profile { private resource: number = 1; /** * problem here */ async initialize(): promise<void> { console.log(this.resource); } } let p = new profile(); p.initialize(); let p = new profile(); p.initialize(); i created sample script transpiles to var __awaiter = (this && this.__awaiter) || function (thisarg, _arguments, prom

Versioning in Greenplum Database -

is doing versioning of greenplum code? can on this, there direct tool or method can in manage version of gp ddl/code of database objects (tables, functions, views) regards, i've had best success of using cron job commit changes source control system git or subversion on daily basis. --create sql file per schema in $(psql -t -a -c "select nspname pg_namespace nspname not 'pg_%' , nspname not '%toolkit' , nspname not in ('information_schema', 'madlib', 'public') order nspname;"); echo $i pg_dump -s -n $i -f $i.sql done in $(ls *.sql); #your code commit changes source control git done

Formatting user input in Java to date -

Image
i having difficulty understanding way change user input of dates an int compared int. trying user input date of birth, compare zodiac signs dates in switch format if possible. going through of post on how change input int, pars, , simpledateformat not able apply it, shown in code when try implement "dateob" should've been formated int, in switch statement did not recognize ... my code far: import java.util.*; import java.text.*; public class signs { public static void main(string[] args) { scanner userinput = new scanner (system.in); // intro message system.out.println("hello you, lets know each other"); // user input begin //name string username; system.out.println("what name ?"); username = userinput.nextline(); //date of birth system.out.println(username + " please enter dob (dd/mm/yyy)"); string dateob = userinput.next();

java - Scheduling the selenium maven project for executing the test cases -

Image
i have maven project has selenium scripts. using junit framework. want schedule using of scheduler services. want know how schedule it. can use windows task scheduler? or can use cron job or jenkins. good?. since maven project possible windows task scheduler. please provide me commands or steps how in of scheduler services. i recommand using jenkins . since using junit can use plugin nice reports this:

.net - Importing CLR using IronPython -

i wanted give ironpython try since want learn more both python , .net underlay. installed last version (2.7.3) , trying import clr, on first line, can't run , throws error "no module named clr". googled didn't find on matter. ironpython install pretty straight forward, windows apps commonly are, can't find did miss here. clues? imports in python case sensitive ( pep 235 ) on case-insensitive platforms (in case) windows. (there may ways around that, sake of compatibility not recommend using them.) if change code correct, lower case spelling should work. import clr if not issue wrong (non-ironpython) interpreter/implementation might cause. if running through python tools visual studio setting @ project properties/general/interpreter should show ironpython ... , not standard python implementation ( python ...).

HTML5 Video Triggered by a graphic elswere on the page -

i trying figure out way have static image appear video when visitor first comes webpage. have graphic button if clicked trigger video play. graphic elswere on page not in or on top of video. so, guess looking how 2 things. play html5 video clicking graphic elswere on page when video played should swap out static graphic version active video version. ideally, once played static version replace video , reset play again. any appreciated. thanks! this should trick, make sure point 'video' , 'image' respective urls. <script> function dovideo() { var video = "myvideo.mp4"; document.getelementbyid("videoimgdiv").innerhtml = "<video autoplay onended=\"doimage()\"><source src=\"" + video + "\"\></video>"; } function doimage() { var image = "http://us.123rf.com/400wm/400/400/podlesnova/podlesnova0906/podlesnova090600034/511739

arrays - Getting an app-crashing Mongo error after the query succeeds -

the insert succeeds , after app crashes, it's in db. schema: /** * section schema */ var sectionschema = new schema({ name: { type: string, required: true } }); /** * report schema */ var reportschema = new schema({ created: { type: date, default: date.now }, title: { type: string, default: '', trim: true, required: 'title cannot blank' }, sections: [sectionschema], user: { type: schema.objectid, ref: 'user' } }); mongoose.model('report', reportschema); controller /** * create report */ exports.create = function (req, res) { var report = new report(req.body); report.user = req.user; report.sections = []; // going on each name of sections , creating empty object each of them req.body.sections.foreach(function (section) { report.sections.push({ name: section }); }); console.log(report); report.save(function (err) { if (err) {

c++ - WinApi: Access denied when creating disk -

i'm running following code administrator privileges: handle hdevice = invalid_handle_value; // handle drive examined bool bresult = false; // results flag dword junk = 0; // discard results hdevice = createfilew(l"\\\\.\\physicaldrive0", // drive open 0, // no access drive file_share_read | // share mode file_share_write, null, // default security attributes open_existing, // disposition 0, // file attributes null); // not copy file attributes if (hdevice == invalid_handle_value) // cannot open drive { std::cout << "invalid handle" << std::endl; return -1; } std::cout << "handle " << hdevice << std::endl; drive_layout_information_ex drv_layout_info_ex; create_disk disk; int n; zeromemory(&disk, sizeof(create_disk)); disk.partitionstyle = par

java - How to determined if the user touch my bitmap? -

how determine if user clicked in regions of imageview? i'm having little bit of difficulty setting (x,y) coordinate bounds detect when particular bitmap being clicked on or not. for example if bitmap's position (75,75),say. i.e. top left corner @ point, if user touches screen @ point (x,y), simple conditional: i have 4 image position draw in canvas it's (75,75),(645,75),(1215,75) , (75,490). it wasn't able determined click give me message, "mimaget" instead of others. @override public boolean ontouch(view v, motionevent event) { int x = (int) event.getx(); int y = (int) event.gety(); switch (event.getaction()) { case motionevent.action_down: if (x >= 75 && x < (75 + mimaget.getwidth()) && y >= 75 && y < (75 + mimaget.getheight())) { toast.maketext(getactivity(), "mimaget", toast.length_short).show(); log.e("touc

r - Auto complete and selection of multiple values in text box shiny -

Image
is possible select multi values using auto complete strings similar google search , stack overflow tags selection in shiny text box. dataset<-cbind("john doe","ash","ajay sharma","ken chong","will smith","neo"....etc) i want select multiple variables above dataset auto fill in textbox , pass server.r ui.r shinyui(fluidpage( titlepanel("test"), sidebarlayout( sidebarpanel( helptext("text"), textinput("txt","enter text",""), #pass dataset here auto complete ), mainpanel( tabsetpanel(type="tab",tabpanel("summary"),textoutput("text2")) ) ) )) server.r # server.r shinyserver(function(input, output) { output$text2<- rendertext({ paste("hello",input$txt) }) } ) edited i have used select2input shinysky selecting mulitiple varialbes have added submit button select

sybase - Sysbase IQ Export and Import -

i sybase bo developer. looking possible option top copy data sybase iq production , load qa/uat. need subset of data(based on dates), not full table. what possible options. thank binu varghese check http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc00170.1540/doc/html/san1288042643642.html , examples @ http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc00170.1540/doc/html/san1288042645377.html the idea set temp options file name, directory etc, run query , result set sent file. must write load command in order load file. seems bit confusing @ first fast

Dual Sim not work in Android mobile when use 3G internet -

i have android phone dual sim. 1 sim use 3g internet connection. other call. problem that. when using internet time if call me other sim can't me. other sim not available. when stop internet use other sim available. my android version 4.0.4 on android mobile go setting sim card manager select receive incomming calls (via other sim card while using data service).. after this setting causes slower transmission..

My Random Number Generator is producing small numbers -

i'm trying create "random" number generator online game. i want create number purely based on positions , stats of players, , based on small counter increments 1 each step in controller. here's code create "seed" , function use seed generate random number 0 -> max non-inclusive: function generate_seed(){ var num = 1; for(var = 0; < number_of_players; i++){ var prevnum = num; num++; } num+=obj_controller.randstep; //randstep variable gets incremented 1 in controller object each step //loops through players with(obj_player){ if(x % 2){num+=x;} else {num-=x;} if(y % 2){num+=y;} else {num-=y;} if(hp % 2){num+=hp;} else {num-=hp;} if(randstep % 2){num+=randstep;} else {num-=randstep;} } return abs(num); } function random(var max){ //generate synced random number 0 -> max, not include max var seeder = synced_random_ge

html - How do I cancel a JQuery animation on a div, when another div lays over it -

Image
i try make kind of menu on side of website small part of menu showing , when hover on it, slides out can click on it. rest of menu beneath main website div , problem when hover on div beneath main website, still activate animation should not happen. <body> <div id="container"> <div id="header"> <img id="headerimg" src="pokebalicon.png" /> </div> <div class="sidediv" id="first" style="margin-top: 100px;"> <p></p> </div> <div id="mainpage"> text </div> </div> </body> the css #container { width: 820px; height: 700px; margin: 100px auto; position: relative; } #header { padding: 10px; height: 100px; width: 100%; background-color: transparent; overflow: hidden; } #mainpage { height: 600px; width: 100