Posts

Showing posts from May, 2010

MS Access 2007: Update calculated field in parent form after subform update -

i have access form 2 nested subforms. "data entry" parent form , beneath "header data", contains subform "capture data". data entry linked header data field "session" , header data linked capture data "survey". both numbers. i need field displays highest value survey. i've used "=max([survey]) this. when had control max survey in header data subform display largest survey whichever session open. added "survey" data entry form , created control max survey there. when form opened display largest value in survey field, however, new records added given session in header subform max survey not continue update each new, larger survey number entered. i've tried control update on exit & afterupdate of survey field in header data, nothing happens or errors. i not have experience vba or sql, appreciate bit of explanation answers involving those. i realize problem fixed autonumber i've never had success

sublimetext3 - sublime text 3 js code completion not working after installing angularJS -

Image
i installed angularjs package control after following link http://weblogs.asp.net/dwahlin/using-the-angularjs-package-for-sublime-text , enabled me angular code hints messed default code hinting feature in sublime-text 3. in attached image, have function decrementcountdown defined, when try use - not show in code completion hints, things see angularjs methods. could please me? thanks try disabling angularjs javascript autocompletion can seen in issue on github page. sublime 3 javascript autocompletion not working properly

mechanicalturk - In Amazon Mechanical Turk, Batch HITs remain in mTurk website UI Manager after approving HITs with API -

i creating batch project via amazon mechanical turk website ( http://requester.mturk.com ). after hits have been completed, download csv , approve or reject hits. i iterating through csv , using mturk api call approveassignment or rejectassignment on assignmentid each row. when looking worker (in completed own hits testing), see hits have been approved or rejected. when looking requester appears none of assignments have been approved or denied , batch project looks still waiting reviewed. any thoughts? appreciated. thanks! this known issue. once operate on hit via api, batch interface no long works correctly. the manage hits individually page should still updated correctly, though.

java - PublishSubject doesn't do anything when calling onNext -

here code using publishsubject. public class rxpager { private int startpage; //starting page number private final int initialpagecount; //number of pages provide when requestnext() called private final publishsubject<integer> requests = publishsubject.create(); private int requestedcount; //basically keeps track of last page requested public rxpager() { this(1, 1); // default start @ page #1 } public rxpager(int startpage, int initialpagecount) { this.initialpagecount = initialpagecount; this.startpage = startpage; } public void decrementrequestedcount(){ requestedcount--; } public void requestnext(int page) { requests.onnext(page); } public observable<integer> pages() { return requests .concatmap(new func1<integer, observable<integer>>() { @override public observable<integer> call(integer targetpage) { //check if have provided page -- if targetpager less

c++ - Why I can use array that initiated with 0 size: Char ch[0]; -

this code: #include<iostream> using namespace std; int main(){ char ch[0]; cin >> ch; cout << ch; return 0; } input1: abcdefghijklmnopqrstuvwxyza output1: abcdefghijklmnopqrstuvwxyza (working fine, don't know why) input2: abcdefghijklmnopqrstuvwxyzab output2: abcdefghijklmnopqrstuvwxyzab_ (request input) input3: abcdefghijklmnopqrstuvwxyzabc output3: (runtime error) when output2 request input, , put input2, output same output2 (with request input again), , output1 or output2 appear when put input1 or input2 in there can explain phenomenon? why happens? an array of size 0 not valid: if constant-expression (5.19) present, shall integral constant expression , value shall greater zero. if compiler accepts it, merely non-standard extension. gcc accepts issue diagnostic if add -pedantic option: warning: iso c++ forbids zero-size array ‘arr’ [-pedantic] nonetheless, reading non-standard array of 0

Text displayed on a button Excel Macro -

how or possible have button assigned macro , have text of such button formula? i.e if a2 "john doe" can button have john doe text??? , if change name "jane doe" have formula (=a2) when ichange text display text of button change automatically???

c# - Javascript Code wont run when changing TextBox Format -

hi using below java script code make calculation in asp grid-view the code wont run if change textbox format in grid-view for example <itemtemplate> <asp:textbox id="txtcalccommision" textmode="number" placeholder="eenter commision" runat="server" cssclass="form-control" ></asp:textbox> </itemtemplate> </asp:templatefield> other code runs perfectly javascript code <script type="text/javascript"> $(document).ready(function () { $("[id*=gvproducts]input[type=text][id*=txtcalc]").on('keyup', (function (e) { var costprice = $(this).closest('tr').find("input[type=text][id*=txtcalccostprice]").val(); var quantity = $(e.target).closest('tr').find("input[type=text][id*=txtcalcquantity]").val(); var commision = $(this).closest('tr').find("input[type=text][id*=txtcalcc

Python: Capturing double backslash C char with regex -

i'm attempting capture '\\' python regex via re module. have attempted using: back = re.compile(r"'\\'") print back.findall(line) where line is: char = '\\'; but doesn't capture anything. i tried: = re.compile("'\\\\'") print back.findall(line) to no avail. what's wrong regex? you need escape backslash: back = re.compile(r"'\\\\'") code: >>> = re.compile(r"'\\\\'") >>> line = r"char = '\\';" >>> print back.findall(line) ["'\\\\'"]

machine learning - SVM - passing a string to the CountVectorizer in Python vectorizes each character? -

i have working svm , countvectorizer works fine when input transform function list of strings. however, if pass 1 string it, vectorizer iterates through each character in string , vectorizes each one, though set analyzer parameter word when constructing countvectorizer . for x in range(0,3): test=raw_input("type message classify: ") v=vectorizer.transform(test).toarray() print(v) print(len(v)) print(svm.predict(vectorizer.transform(test).toarray())) i'm able fix issue changing second line in above code to: test=[raw_input("type message classify: ")] but seems strange have 1-item list. isn't there better way without constructing list? it expects list or array of documents when pass in single string assumes each element of string document (ie: character). try changing svm.predict(vectorizer.transform(test).toarray()) svm.predict(vectorizer.transform([test]).toarray()) ps: toarray() part not

java - Why does parallel stream with lambda in static initializer cause a deadlock? -

i came across strange situation using parallel stream lambda in static initializer takes seemingly forever no cpu utilization. here's code: class deadlock { static { intstream.range(0, 10000).parallel().map(i -> i).count(); system.out.println("done"); } public static void main(final string[] args) {} } this appears minimum reproducing test case behavior. if i: put block in main method instead of static initializer, remove parallelization, or remove lambda, the code instantly completes. can explain behavior? bug or intended? i using openjdk version 1.8.0_66-internal. i found bug report of similar case ( jdk-8143380 ) closed "not issue" stuart marks: this class initialization deadlock. test program's main thread executes class static initializer, sets initialization in-progress flag class; flag remains set until static initializer completes. static initializer executes parallel stream, causes lambd

c# - change the foreground Color of a TextBlock when Hover in a universal app -

i have listview,in want assign style when hover on each listviewitem style:details.xaml: <listview x:name="listmee"> <listview.itemcontainerstyle> <style targettype="listviewitem"> <setter property="template"> <setter.value> <controltemplate targettype="listviewitem"> <grid> <visualstatemanager.visualstategroups> <visualstategroup x:name="commonstates"> <visualstate x:name="normal"/> <visualstate x:name="pointerover"> <storyboard> <coloranimation duration="0" to="#d9d7ec" storyboard.targetproperty="(rectangle.fill).(solidcolorbrush.color)" storyboard.targetname="listitem1" />

PHP find url in sa text and save in array -

i have txt file , want save in array urls starting http:// , ends .png or .jpg or .jpeg. how can that? can use this? <?php function geturls($string) { $regex = '/https?\:\/\/[^\" ]+/i'; preg_match_all($regex, $string, $matches); return ($matches[0]); } $urls = geturls($string); foreach($urls $url) { echo $url.'<br />'; } ?> is correct? the function showed not work because there's nothing specifying .png , .jpg , or .jpeg in regex. return first match: $matches[0] . additionally, needs /g flag find multiple instances in same string ( /i ignores case). try instead: <?php function geturls($string) { // \w word character $regex = '/https?\:\/\/[\w]+\.(jpg|png|jpeg)/ig'; preg_match_all($regex, $string, $matches); return ($matches); } $urls = geturls($string); foreach($urls $url) { echo $url.'<br />'; } ?>

For a C# List, how do I reorder a column when one record's value changes? -

i have kendo grid user can change order of rows moving rows , down. adjust order field incrementing or decrementting one. need reorder rest of items in grid. pass data controller , trying reorder list. feel i'm close, can't quite right. can me figure out how this? example: start grid test | order | 1 b | 2 c | 3 d | 4 the user clicks on b row , arrow grid looks this: test | order b | 1 | 1 c | 3 d | 4 this part working fine don't think code necessary. here's need help. controller , have list this: [0] test: b, order: 1 [1] test: a, order: 1 [2] test: c, order: 3 [3] test: d, order: 4 there 2 records order equals 1. how reorder list (so can save new order database? what want list looks this: [0] test: b, order: 1 [1] test: a, order: 2 [2] test: c, order: 3 [3] test: d, order: 4 i came solution, recursive part isn't working right. list returned blank. can find what's wrong? [httppost] public act

c++ - Read access violation while using v8::Debug::SetMessageHandler -

Image
i'm trying implement v8 debugger in qt application exception. i have 2 threads: main (that handle gui , debugger commands) , engine thread (that run javascript code). in main thread i'm initializing v8 calling: v8::initializeicu(); mplatform = platform::createdefaultplatform(); v8::initializeplatform(mplatform); v8::initialize(); i'm creating isolate in engine thread: arraybufferallocator* allocator = new arraybufferallocator(); isolate::createparams create_params; create_params.array_buffer_allocator = allocator; isolate = isolate::new(create_params); in main thread i'm using setmessagehandler isolate->enter(); v8::debug::setmessagehandler(handlemessage); // handlmessage function: void handlemessage(const v8::debug::message& message) { v8::string::utf8value response(message.getjson()); // todo |response| } at line setmessagehandler read access violation here call stack: fwiw i'd asked on v8-users discussion group also. (no

c# - how to get an enum from another script in unity -

i trying create win condition script pulling status of enum different script , stuff it. crowd.cs public enum crowdoptions {none, teama, teamb}; public crowdoptions crowd; crowd = crowdoption.none; i have crowd doing bunch of stuff, lets set none. winning.cs if (crowd = crowdoption.none){ } else if (crowd = crowdoption.teama){ } else { } i tried getcomponent , set result of of crowd newvariable, don't think did right public crowdsway = gameobject.find("crowdmanager").getcomponent<crowdmanager>(); i tried if (crowdmanager.crowd = crowdoptions.none) { print("none"); } else { print("hmmmmmm"); } that didn't work either. in order access crowd enum variable in crowd.cs class script, script needs have instance of crowd object. example: public class crowd : monobehaviour { public enum crowdoptions {none, teama, teamb}; public crowdoptions crowdopts; } public class winni

javascript - Duplicate events with fullcalendar function-generated events -

Image
using fullcalendar , i'm generating event objects xml feed using events function . problem in month view, each event appears on calendar twice (two <td> s per event in feed). what i've tried i've literally started on copying example page, modifying use real xml feed: $("#calendar").fullcalendar({ events: function(start, end, timezone, callback) { $.ajax({ url: settings.feeduri, datatype: "xml", success: function(doc) { var events = []; $(doc).find("buyout").each(function() { events.push({ title: $(this).find("title").text(), start: $(this).find("date").text() + "t" + $(this).find("starttime").text() + ":00z", }); }); callback(events); } });

antlr - Proper way to use visitors in ANTLR4 (javascript target) -

i having trouble understanding how use visitors in antlr4, javascript target. i have prepared basic grammar, accepts int + int or int - int operations. grammar plusminus; int : [0-9]+; ws : [ \t\r]+ -> skip; plus : '+'; minus : '-'; input : plusorminus ; plusorminus : numberleft plus numberright # plus | numberleft minus numberright # minus ; numberleft : int; numberright : int; from grammar antlr generate visitor has these 3 functions, visitinput , visitplus , visitminus . start visitinput able fetch operation ctx doing operation = ctx.plusorminus() . this stuck, how know if operation of type plus or minus? in other words, pass ctx.plusorminux() , visitplus() or visitminus() ? i managed create visitor work, it's ugly, i posting here because perhaps better understand question. lines 20-29 problem is. first of all... plus , minus lexer rules. don't visit tokens (the result of lexer rules). it rather

angularjs - Cordova plugins in Ionic 1 app using Typescript -

i'm new typescript. started ionic 1.2.4 (angular) project using typescript. when transpiling, receive error message property 'keyboard' not exist on type 'cordovaplugins' due following function passed angular.module.run() in file run.ts ///<reference path="../../typings/tsd.d.ts"/> export function onrun($ionicplatform) { $ionicplatform.ready(function() { if (window.cordova && window.cordova.plugins && window.cordova.plugins.keyboard) { cordova.plugins.keyboard.hidekeyboardaccessorybar(true); cordova.plugins.keyboard.disablescroll(true); } if (window.statusbar) { statusbar.styledefault(); } }) } the cordova plugin in fact installed , it's type definition file exists. here file tsd.d.ts . /// <reference path="angularjs/angular.d.ts" /> /// <reference path="cordova/cordova.d.ts" /> /// <reference path="cordova/plugins/batterystatus.d.ts" /

android - Will ToolBar work for API level>=14 -

the toolbar class added in android api 21. mean minimum api level required 21. if case how work in lower api's 14. asking question because actionbar.tablistener shown deprecated , alternative suggested toolbar class. targeting api level>=14. toolbar work api>=14. there 2 implementations of toolbar . one part of android sdk, , available on api level 21+. the other part of the appcompat-v7 library , , works on api level 7+.

Get Google Analytics Content Experiment parameters from Google Tag Manager in Android App -

Image
hi, i have set google tag manager , google analytics , linked them 1 another. then, have set container in google tag manager , added variable called "google analytics content experiment" within container. created 2 types of experiment variations ( can refer picture).i have set "percentage of users included in experiment" 50%, 50% users default config value json , other 50% users different value.then, published container , downloaded binary file , included in "raw" folder of android app. then in android app, did following within oncreate method: tagmanager tagmanager = tagmanager.getinstance(this); // modify log level of logger print out not // warning , error messages, verbose, debug, info messages. tagmanager.setverboseloggingenabled(true); pendingresult<containerholder> pending = tagmanager.loadcontainerprefernondefault(container_id, r.raw.gtm_default_container); pending.setresultcallback(new resultcallback&

Python split string that have two delimited -

i want know how split string more 1 delimiter. have problem splitting if 1 space? i trying read text file has this: 22.0;2016-01-16 00:16:18 i know how read text file variable, when have problem split string can't go further. all have code: with open('datasource_3.txt', 'r') f: data = f.readlines() line in data: words = line.strip().split(';') print words you can split regular expression ;| , so: import re x = '22.0;2016-01-16 00:16:18' print re.split(';| ', x) this prints ['22.0', '2016-01-16', '00:16:18'] .

asp.net mvc 5 - Dropdown menu from SELECT distinct -

Image
i trying create drop-down menu distinct values. select distinct rolegroup ccf.role in controller am var rolegroups = db.roles.select(x => x.rolegroup).distinct(); viewbag.rolegroups = new selectlist(rolegroups, "rolegroup", "rolegroup", null); in view am @html.dropdownlistfor(model => model.rolegroup, (@viewbag.rolegroups) ienumerable<selectlistitem>, new { htmlattributes = new { @class = "form-control" } }) i error of what this? your query returning ienumerable<string> , selectlist constructor trying access rolegroup property of string (the 2nd , 3rd parameters) not exist. needs be viewbag.rolegroups = new selectlist(rolegroups);

php - Wordwrap will issue link src and img src -

<?=$postcontent = wordwrap($qry_post['content'], 67, "<br />", true);?> if content has long link in it, or big code, halt @ part , it, result in html entity because of new line/ in src code. any way fix this? thanks! in comments manual wordwrap() posted code snippet solve issue: <?php function textwrap($text) { $new_text = ''; $text_1 = explode('>',$text); $sizeof = sizeof($text_1); ($i=0; $i<$sizeof; ++$i) { $text_2 = explode('<',$text_1[$i]); if (!empty($text_2[0])) { $new_text .= preg_replace('#([^\n\r .]{25})#i', '\\1 ', $text_2[0]); } if (!empty($text_2[1])) { $new_text .= '<' . $text_2[1] . '>'; } } return $new_text; } ?>

javascript - How to add class to the element using Angular's ngFocus directive (or any directive embedded in Ionic Framework) at input in a template? -

this question has answer here: angular.js: set css when input on focus 3 answers i have template this: <label class="item item-input" ng-class="{'focus':authdata.username.focus}"> <--add class here if input:focus <span class="input-label">username</span> <input type="text" name="username" ng-model="authdata.username" ng-focus="" <--check if focus required ng-minlength="5" ng-maxlength="20"> </label> how can check if input has focus , add class label? possible without external function in controller? <label class="item item-input" ng-class="{'focus':focus===true}"> <span clas

objective c - Parse iOS Unit Testing a subclass of PFUser -

i'm trying unit test (with xctest) subclass of subclass of pfobject getting warnings such subclasses part of testing target: class mysubclassofsubclassofpfobject implemented in both /var/mobile/containers/bundle/application/84c7811f-348e-42ef-9ff4-f243db669591/myapp.app/myapp , /var/mobile/containers/data/application/a84479a8-1acd-4f7b-b02d-a28cb412cd14/tmp/myapptests.xctest/myapptests. 1 of 2 used. 1 undefined. i'm getting exception subclass of pfuser: *** terminating app due uncaught exception 'nsinternalinconsistencyexception', reason: 'tried register both parseuser , parseuser native pfobject subclass of _user. cannot determine right class use because neither inherits other.' i've installed parse 1.12 via cocoapods , running xcode 7.2. my podfile looks this: target 'watchi' use_frameworks! pod 'parse' end target 'watchitests' end in test target build settings, i've added $(srcroot) user header search paths

c# - Linq union two tables where on has an extra column -

i using union combine 2 tables audit , message . both have same column names except audit has column called deletedate . try use union merge both table if deletedate not exist, sets deletedate method null. commented out trying work. when uncomment code, error. there work around? here code var audit = in _audit.getall() .where(a => a.pint == pint && a.createdate < startdate && (enddate == null || enddate > a.createdate)) select new { a.mint, a.mid, a.desc, a.pstring, a.ptype, a.mtype, a.createdate, // a.deletedate, a.pint }; var message = in _message.getall() .where(a => a.partnerint == partn

MySQL: group by hour AND by other distinct fields -

i have 'logs' table, in search results' counters stored, search query , user searched it. my goal display results grouped hour, i'm having issues when using group because i'm losing distinct users / queries in process. here's fiddle: http://sqlfiddle.com/#!9/484c01/7 as can see, results being count according results no. output not correct. in advance help. there data size limits on can returned following method, if want preserve distinct row values of non-grouped-by-columns when doing group by , can use group_concat mysql function combine each row's value 1 row separated commas. see http://dev.mysql.com/doc/refman/5.6/en/group-by-functions.html#function_group-concat usage examples. important: sure read documentation's note on group_concat_max_len , max_allowed_packet in link provided above.

entity framework - Convert String to Int in LINQ to Entities -

i trying duplicate following sql statement linq entities query (where "products" table mapped entity) ... note iqueryable ... of have seen posted solutions convert either search parameters , or dump results ienumerable , proceed convert there. dealing 100's of millions of records , cannot afford load 200 million records memory, have filter through them again. like, if possible in single query databse. select * products model_code = '65' , cast(serial_number int) > 927000 , cast(serial_number int) < 928000 i have tried following ... int startsn, endsn; startsn = 9500 endsn = 9500 if (!int.tryparse(startserialnumber, out startsn)) throw new invalidcastexception("the start serial number not valid value"); if (!int.tryparse(endserialnumber, out endsn)) throw new invalidcastexception("the end serial number not valid value"); iqueryable<product> resultlist = base.context.products.where(b =>

android - How to set visibility of TextView? -

i want check! example - if (tv.visible == true) showmessage ("yee it's visible") else ("its not visible"); hope you're understand! you provide little information, think after... textview tv = (textview)findviewbyid(r.id.textview); tv.setvisibility(view.invisible); you need adjust id own. edit: can check see if textview invisible by: if (tv.getvisibility() == view.invisible) { // something. }

Jetty 9.3.6 + Spring: HTTPS automatically redirected to HTTP -

i don't know why https request automatically redirected http, , that's problem: the original request: remote address:127.0.1.1:7171 request url:https://w-rli09-ben:7171/main/app/test request method:get status code:302 found response headers: content-length:0 date:sat, 16 jan 2016 01:02:11 gmt location:http://w-rli09-ben:7171/main/login server:jetty(9.3.z-snapshot) the jetty + spring debug logs: 2016-01-15 16:58:58 debug o.e.j.s.session:347 - scavenging sessions @ 1452905938843 2016-01-15 16:58:58 debug o.e.j.i.managedselector:234 - selector loop woken select, 1/1 selected 2016-01-15 16:58:58 debug o.e.j.i.selectchannelendpoint:159 - onselected 1->0 r=true w=false selectchannelendpoint@33c50677{/127.0.0.1:56564<->7171,open,in,out,fi,-,14176/30000,sslconnection}{io=1/0,kio=1,kro=1} 2016-01-15 16:58:58 debug o.e.j.i.selectchannelendpoint:186 - task selectchannelendpoint@33c50677{/127.0.0.1:56564<->7171,open,in,out,fi,-,14176/30000,sslconnection}{io=1

Android proguard error com.google.ads.util.i: and setMediaPlaybackRequiresUserGesture(boolean) -

i trying create apk file, when press finish on export dialog, got error, , apk not created. cannot find on net far, maybe here can help? error: proguard returned error code 1. see console warning: com.google.ads.util.i: can't find referenced method 'void setmediaplaybackrequiresusergesture(boolean)' in class android.webkit.websettings should check if need specify additional program jars. warning: there 1 unresolved references program class members. input classes appear inconsistent. may need recompile them , try again. alternatively, may have specify option '-dontskipnonpubliclibraryclassmembers'. java.io.ioexception: please correct above warnings first. @ proguard.initializer.execute(initializer.java:321) @ proguard.proguard.initialize(proguard.java:211) @ proguard.proguard.execute(proguard.java:86) @ proguard.proguard.main(proguard.java:492) i tried add -dontskipnonpubliclibraryclassmembers but

java - Freemarker can't find JSP tld-s -

i creating project tomcat 7, spring 4.1.7 (with spring mvc) , freemarker 2.3.23. libs deployed under /web-inf/lib contains custom libs tlds under own /meta-inf/. but when freemarker scans <#assign a=jsptaglib["/web-inf/a.tld"]>, system complains can't find definition file. after debugging freemarker's taglibfacotry.java, found explicitly mapped tld location not working. means have put tlds directly under class path. tried copy on 1 tld /web-inf/, works. further investigation shows "servletcontext.getresourcepaths("/web-inf/lib")" returns null value. did miss configurations? or related compatibility problem since works fine jetty? thanks in advance. verify if deployment copying jars web-inf/lib. taglibfactory scans every jar inside there searching /meta-inf/**/*tlds. take @ https://stackoverflow.com/a/37092269/1113510

Using the matching class of isAssignableFrom() method in Java -

i have abstract class called pet lots of classes subclassing it. public abstract class animal { } public abstract class wildanimal extends animal { } public abstract class pet extends animal { public abstract void mynameis(); } public class dog extends pet { @override public void mynameis() { system.out.println("dog meat"); } public void bark() { system.out.println("woof"); } } public class cat extends pet { @override public void mynameis() { system.out.println("cheshire"); } public void purr() { system.out.println("purr"); } } // somewhere else in project ... list<animal> animals = new arraylist<animal>(); // lots of animals added by: animalmoves(animals); public void petmoves(list<animal> animals) { if (pet.class.isassignablefrom(animals.getclass())) { // dog, cat, mouse, etc. pet = (pet)pet; i want able call overridden my

ios - Static Height Custom Cell ListView -

i having trouble working out static height (35) on custom cell row. keep getting overlapped list defined height when try bring down return height below 120 35. - (cgfloat)tableview:(uitableview *)tableview heightforrowatindexpath:(nsindexpath *)indexpath { return 120; } thanks in advance help.

javascript - Not working 'PImage' as Class Property in Processing.js -

what trying is, declare class has image it's property.then declaring object of class , call draw function.but it's not working....why? here processing.js part of .html page <script type="text/processing"> pimage starimage; void setup(){ size(400,400); smooth(); starimage = loadimage("star.png"); } var star = function(x,y) { this.x = x; this.y = y; this.img = starimage; }; star.prototype.drawstar = function(){ image(this.img,this.x,this.y,50,50); }; var obj = new star(50,50); draw = function(){ obj.drawstar(); }; </script> but if change "image(this.img,this.x,this.y,50,50);" "image(starimage,this.x,this.y,50,50);",it's works.that seems assignment of 'starimage' (pimage) in

no matching function for call to sc_trace in systemc -

i using systemc simulation , got error message telling that g++ -i/opt/xilinx-14.2/vivado_hls/2012.2/linux_x86_64/tools/systemc/include/ -o testbench.exe testbench.cc -l/opt/xilinx-14.2/vivado_hls/2012.2/linux_x86_64/tools/systemc/lib -lsystemc -lm /opt/xilinx-14.2/vivado_hls/2012.2/linux_x86_64/tools/systemc/include/sysc/communication/sc_signal_ports.h: in member function void sc_core::sc_in::end_of_elaboration() [with t = std::basic_string, std::allocator >]: testbench.cc:126: instantiated here /opt/xilinx-14.2/vivado_hls/2012.2/linux_x86_64/tools/systemc/include/sysc/communication/sc_signal_ports.h:285: error: no matching function call sc_trace(sc_core::sc_trace_file*&, const std::basic_string, std::allocator >&, std::string&)รข€™ do guys have idea error , how fix it? #include "systemc.h" #include "multichipmodule.cc" #include <vector> #include <string> #include <iostream> int converttime(std::string input){ //

javascript - How to align elements center on resize? -

there position:inline-block; elements within wrapper, positioned absolutely. using text-align:center or margin:0 auto not working. here jsfiddle: jsfiddle.net/dralyuk/r7y7qucv/1/ var el = document.getelementsbyclassname('el');; function buildgallery() { (var = 0; < el.length; i++) { el[i].style.position = 'static'; el[i].style.top = el[i].offsettop + 'px'; el[i].style.left = el[i].offsetleft + 'px'; } (var = 0; < el.length; i++) { el[i].style.position = 'absolute'; } } buildgallery(); window.onresize = function() { buildgallery(); } .elswrap { font-size: 0; position: relative; } .el { font-size: 12px; height: 120px; width: 120px; margin: 5px; display: inline-block; vertical-align: top; -webkit-transition-duration: 1s; -moz-transition-duration: 1s; -ms-transition-duration: 1s; -o-transition-duration: 1s; transition-duration: 1s; over