Posts

Showing posts from February, 2013

objective c - constraints cause an ambiguousLayout -

i have nswindow instance have setupui method. -(void) setupui { nsview* subview = [[nsview alloc] initwithframe:nszerorect]; subview.wantslayer = yes; subview.layer.backgroundcolor = [[nscolor greencolor] cgcolor]; [self.contentview addsubview:subview]; [self.contentview settranslatesautoresizingmaskintoconstraints:no]; [self.contentview addconstraint:[nslayoutconstraint constraintwithitem:self.contentview attribute:nslayoutattributeleading relatedby:nslayoutrelationequal toitem:subview attribute:nslayoutattributeleading multiplier:1 constant:0]]; [self.contentview addconstraint:[nslayoutconstraint constraintwithitem:self.contentview attribute:nslayoutattributetop relatedby:nslayoutrelationequal

Matlab/Octave: how to write n-dimensional zero padding algorithm without eval -

i write "syntactical sugar" octave or matlab zero-padding function, user sends n-dimensional object , vector of <= n entries. vector contains new, equal or larger dimensions object, , object zero-padded match these dimensions. dimensions not specified left alone. 1 expected use is, given example 5d block x of 3d medical image volumes, can call y = simplepad(x, [128 128 128]); and pad first 3 dimensions power of 2 wavelet analysis (in fact use separate function nextpwr2 find these dimensions) while leaving others. i have racked brains on how write method avoiding dreaded eval, cannot far find way. can suggest solution? here more or less have: function y = simplepad(x, pad) szx = size(x); n_pad = numel(pad); szy = [pad szx(n_pad+1:end)]; y = zeros(szy); indices_string = '('; n = 1:numel(szx) indices_string = [indices_string, '1:', num2str(szx(n))]; if n < numel(szx) indices_string = [indices_string, ',']; else

xml - XSLT Conditional Count -

new site. hoping can me figure out why code not working. used other posts on subject site close, can't see error. xslt: <!-- keyset based on subject (part number) --> <xsl:key name="key_partnumber" match="subject" use="."/> <xsl:template match="/"> <bom> <!-- each unique subject (part number) --> <xsl:for-each select="//markup/subject[generate-id() = generate-id(key('key_partnumber', .)[1])]"> <part> <xsl:attribute name="part_number"> <xsl:value-of select="."/> </xsl:attribute> <xsl:attribute name="count"> <xsl:value-of select="count(//markup[subject=.])"/> </xsl:attribute> </part> </xsl:for-each> </bom> </xsl:template> </xsl:stylesheet>

ember.js - EmberJS access Ember.Object in Ember.Controller -

my purpose separate lot of boilerplate code in object, know how access object in controller. the code looks this. import ember 'ember'; "use strict"; var panel = ember.object.extend({ }); const person = ember.object.extend({ init() { this.set('shoppinglist', ['eggs', 'cheese']); } }); export default ember.controller.extend({ width: 0, height: 0, panel: null, you can create object person class , assign controller properties. arrays , objects defined directly on ember.object shared across instances of object. when new instance created, init() method invoked automatically. ideal place implement setup required on new instances. reference const panel = ember.object.extend({ }); const person = ember.object.extend({ init() { this._super(...arguments); this.set('shoppinglist', ['eggs', 'cheese']); } }); export default ember.controller.extend({

PHP Session Not working and not giving any error -

in login.php have <?php require_once('connection.php'); $loginerr = ""; if(isset($_post['login'])) { $email = mysqli_real_escape_string($conn,$_post['email']); $pass = mysqli_real_escape_string($conn,$_post['password']); $sel_user = "select * register email='$email' , password='$pass'"; $run_user = mysqli_query($conn, $sel_user); $check_user = mysqli_num_rows($run_user); if($check_user>0){ $_session['email'] = $email; header('location: '.'index.php'); } else { $loginerr = "email or password not correct, try again!"; } } ?> basically if username , password matches creates session "email" , redirects index page. in navbar common pages index , other. have <ul class="nav navbar-nav navbar-right"> <?php if(!isset($_session['email'])) { ?> <li><a href="login">login</a>&l

android - Get system time in millisecond using Buttons while recording video -

i recording video using camera2api button start recording.now when recording starts, need system time in milliseconds if press specific button(other start rec button ) . if not system time, @ least record time of video being recorded. the time should stored if press specific button. have tried using system.currenttimemillis() , systemclock.elapsedtime() , once recording starts , press specific button record time without stopping recorded ,it doesn't store time details , shows 0. below code using store time: case r.id.video: { if (misrecordingvideo) { stoprecordingvideo(); } else { starttsrecordingvideo(); starttime = system.currenttimemillis(); log.d(tag, "onclick:time "+starttime); switch (view.getid()){ case r.id.stop:{ stoptime= systemclock.elapsedrealtime()-starttime; log.d(tag, &q

jquery - How to place indicators in seperate columns and left and right controls in bottom of in bootstrap carousel -

Image
please consider code: <div class="container"> <div id="mycarousel" class="carousel slide" data-ride="carousel"> <!-- indicators --> <ol class="carousel-indicators"> <li data-target="#mycarousel" data-slide-to="0" class="active"></li> <li data-target="#mycarousel" data-slide-to="1"></li> <li data-target="#mycarousel" data-slide-to="2"></li> <li data-target="#mycarousel" data-slide-to="3"></li> </ol> <div class="carousel-inner" role="listbox"> <div class="item active"> <div class="row"> <div class="col-md-2"> <a href="#" class=&q

scala - What is the latest akka version that can be used with 1.3.4 spray? -

here written: spray 1.3.4 built against scala 2.10.5 , akka 2.3.9 scala 2.11.6 , akka 2.3.9. does mean "com.typesafe.akka" %% "akka-actor" % "2.4.12" "io.spray" %% "spray-can" % "1.3.4" in build.sbt bad combination ? is latest version of akka compatible spray "2.3.9" ?

How to execute python function in java using jython which has import modules on top of py files -

i trying execute python function in java using jython, using python file has import module, , due execution fails saying traceback (most recent call last): file "\users\ibm_admin\desktop\poc\swt\src\com\test\startpcommexecution.py", line 7, in import const importerror: no module named const if create simple function no import modules works fine. is there way how overcome failure of import modules using jython?

.net - Bulk insert via Dapper is slower than inserting rows one-by-one -

i'm using dapper insert data realtime feed sql server, care performance. recently, noticed strange. out of box, if give dapper collection , insert query, fires insert statements each element. tests show can insert 1800 objects 12 fields in 1 second way (counting connection.execute(...) running time. now, didn't find batch insert functionality in dapper , implemented own (constructing parameter list , sql query). after that, found out can insert 1 batch in 3 seconds (which limited 1000 rows) (again, counting connection.execute(...) calls. so, makes batching 6 times slower sending each row in separate query. can explain me? thought people use batch operations speed process. insert time 1 second @ most. use sql server 2012 standard on local network. table i'm inserting has clustered index on primary key (which bigint field), no non-clustered indexes , triggers. can post code, there's nothing special i'm not sure why using dapper execute extension

sql - VB.Net Linq with datatables - select from one table what does not exist in the other -

i have 2 data on have applied linq select lines : csql = "select * v_vente code_projet=" & comprojet.getcolumnvalue("code_projet") & " " dim tabvnt datatable = utilitaire.getdatatable(csql) dim query1 = tabvnt.asenumerable().where(function(r) directcast(r("date"), date) >= dtdu , directcast(r("date"), date) <= dtau) dim tabannule datatable = utilitaire.getdatatable("select * v_reserv_annule") dim query2 = cust in tabannule.asenumerable() (cust.type = "définitif" or cust.type = "transfert") , cust.date_annule <= dtau now want select rows "query1" "num_r" not exist in "query2". column "num_r" exist in both datatable "tabvnt" , "tabannule" i've tried code doesn't work,please me find error : dim rows = t1 in query1 .asenumerable() join t2 in query2.asenumerable() on t1.field(of string)("num_r") equals t2.

ubuntu - result of postgresql xlog dump -

i using postgresql db in ubuntu. got know wal logs , pg_xlogdump. used pg_xlogdump print wal logs on screen. have no idea how interpret response , know transactions made. to read , understand pg_xlogdump output, must know postgresql's internals. the desc tell operation took place (something nextoid or insert_leaf ) further details (e.g., next oid or @ offset in block of file new index entry added). you'll have read the source understand different entry types.

sql server - BCP Invalid character value for cast specification -

trying bcp stackoverflow [users] table 1 sql server , hit error "invalid character value cast specification" small amount of records. specifically, 4 records out of 5 million+ hit error. exp error msg = row 1176293, column 3: invalid character value cast specification question is, why these 4 records hit error? makes them different rest? to re-create error, create [users] table in sql server. create table [dbo].[users]( [id] [int] not null, [aboutme] [nvarchar](max) null, [age] [int] null, [creationdate] [datetime] not null, [displayname] [nvarchar](40) not null, [downvotes] [int] not null, [emailhash] [nvarchar](40) null, [lastaccessdate] [datetime] not null, [location] [nvarchar](100) null, [reputation] [int] not null, [upvotes] [int] not null, [views] [int] not null, [websiteurl] [nvarchar](200) null, [accountid] [int] null) bcp file [users] table load fine, represent 5+ million records loads without error. https://1drv.ms/t/s!atylcajdsq_qgbbpgis-fk6aky

Git commit that doesn't override original authors in git blame -

i've used perl script modify tab characters in php git repository , changed them 4 spaces. $ find -iname \*.php -exec perl -pi -e "s/\t/ /g" {} \ i can commit change git commit , mark me author of changed lines inside git blame after commit made. is there way commit massive change doesn't mark me author of changed lines, retains original author? that's lot of history don't want lose in our project. our purpose in replacing tabs 4 spaces not make things appear different in git blame, follow proper pear coding standards. e.g. no tabs, use 4 spaces indentation. thanks wnoise on git: change styling (whitespace) without changing ownership/blame? , came run arbitrary filter on git history, using rewrite history make offending whitespace or other issues never committed, leaving original authors in tact code cleaned up: git filter-branch --tree-filter 'git diff-tree --name-only --diff-filter=am -r --no-commit-id $git_commit | php cleanu

Getting selected values without redirecting to another page using Jquery or javascript -

hi trying selected value dropdown using jquery. when click on option redirecting page , because of not able see output on console. can me out code? this tried if(typeof jquery == "undefined"){ $(document).ready(function() { $("#uniqname_7_0defaultselect").change(function() { var selectedtext = $(this).find(":selected").text(); console.log(selectedtext); }); }); } try use preventdefault() prevent default action : $(document).ready(function() { $("#uniqname_7_0defaultselect").change(function(e) { e.preventdefault(); var selectedtext = $('option:selected', this).text(); console.log(selectedtext); }); }); hope helps. $(document).ready(function() { $("#uniqname_7_0defaultselect").change(function(e) { e.preventdefault(); var selectedtext = $('option:selected', this).text(); console.log(selectedtext);

angularjs - ngStorage module not found only in gulp dist:serve? -

Image
i strike error 1 again, last time have fixed not know how fixed again occurs. i have ngstorage module installed , projecr run fine when it's in development ( gulp clean serve ) when goes production ( gulp serve:dist ) , execute main page blank , there error in console uncaught error: [$injector:modulerr] failed instantiate module app due to: error: [$injector:modulerr] failed instantiate module ngstorage due to: error: [$injector:nomod] module 'ngstorage' not available! either misspelled module name or forgot load it. if registering module ensure specify dependencies second argument. http://errors.angularjs.org/1.5.8/ $injector/nomod?p0=ngstorage although have checked it's installed can can suggest issue , how fix this? here bower.json { "name": "project", "version": "0.1.1", "dependencies": { "angular-animate": "1.5.8", "angular-touch": "~1.

javascript - Anychart : How to add animation in Pie or funnel chart of AnyChart7.1 -

i using latest version of anychart. provide animation features using chart.animation(true) this feature working fine line chart , other charts column not work many charts. how can add animation pie , funnel charts. animation issue fixed in release 7.12.0 please, take @ pie chart sample chart.animation(true, 800); funnel chart sample chart.animation(true, 800); pyramid chart sample chart.animation(true, 800);

What is the relevancy of the SQL Azure database size? -

Image
i upgraded basic s0 standard , came default max. database size of 250 gb. kept max size, although database 3 gb in size. relevant billing @ all? i guess larger database size make difference in billing once database file using space on disk, not sure this. maybe reserving 250 gb cost extra. you billed based on tier in ,not database size..database size feature of tier..you need not worry unexpected costs.the thing,that may vary specified budget outbound data transfers those prices nominal..

postgresql - psql: FATAL: role "test" does not exist -

i new postgres , facing difficulty in connecting db after server reboot. have created database pgdb under os user test. after server restarted, restarted pgsql issuing command service postgresql-9.6 start starting postgresql-9.6 service: [ ok ] if issue psql, taken psql prompt data path here different have set previously. when try connect pgdb postgres user, error: psql: fatal: database "pgdb" not exist when try connect test user: psql -d pgdb psql: fatal: role "test" not exist please suggest

c++ - C : Implement sizeof_32() and sizeof_64() for 32 - bit and 64 - bit compilations -

i building custom debugger compiled 64 - bit ( cc -q64 ... ) can attach both 32 - bit , 64 - bit executables , peep memory segments. facing following scenario: a.h : struct dll{ void *nxt; void *prev; }; struct obj{ struct dll link; int unique_id; //unique id find structure in stack or data area ... //some more members }; a.c : #include<stdio.h> #include"a.h" struct obj ob1; main(){ struct obj ob 2; ob1.id = 0x189acf; ob2.id = 0x98bdac; while(1); } debug.c : #include"a.h" main(){ //attaching toprocess a.c //peeping stack area find 0x98bdac found @ address1 //peeping data area find 0x189acf found @ address2 //using address1 - sizeof(struct dll) trying reach begining of obj1 //using address2 - sizeof(struct dll) trying reach begining of obj2 } the problem encountering is: when a.c compiled in 32 - bit mode size of struct dll 4+4= 8 bytes in debuger (always 64 - bit) finds si

javascript - PhantomJs example not working? -

can please tell me why example in below link not working. added timeout 12 seconds. showing me => console.log("'waitfor()' timeout"); link: https://github.com/ariya/phantomjs/blob/master/examples/waitfor.js i copied example not working. trying run using 'phantomjs'. can please guide me possible reasons? phantomjs version: 2.1.1 i have modified script, , it's working: /** * wait until test condition true or timeout occurs. useful waiting * on server response or ui change (fadein, etc.) occur. * * @param testfx javascript condition evaluates boolean, * can passed in string (e.g.: "1 == 1" or "$('#bar').is(':visible')" or * callback function. * @param onready when testfx condition fulfilled, * can passed in string (e.g.: "1 == 1" or "$('#bar').is(':visible')" or * callback function. * @param timeoutmillis max amount of time wait. if not specified, 3 sec u

RPC-GWT Serialization/java.util.Date Encoding -

i'm creating script serializes gwt requests , have problem encoding date values comply rpc-gwt standard. going through http logs noticed date values converted strings of 7 characters can't recognize algorithm used patterns. does know algorithm used encrypt date values? those date values serialized long values => milliseconds since epoch (january 1 1970) , serialized in packed form base64 become shorter strings. here have look: /** * parse string containing base-64 encoded version of long value. * * keep synchronized version in base64utils. */ static long longfrombase64(string value) { int pos = 0; long longval = base64value(value.charat(pos++)); int len = value.length(); while (pos < len) { longval <<= 6; longval |= base64value(value.charat(pos++)); } return longval; } /** * return optionally single-quoted string containing base-64 encoded * version of given long value. * * keep synch

ruby on rails - Dynamically get records between two dates -

i'm working on project @ moment have voting system , on index page vote model can see average vote last week. i'd able have user able choose date between rating averaged. i'm not sure how go doing this. currently have view shows @average defined as: vote.where(date: (date.today - 7)..(date.today)).average(:score) my initial though include 'date range' attribute model , have average calculated dates, set form in index view, seems lot of overhead such simple task. any appreciated. as wanted achieve model point of view, can use dynamic scope of rails achieve this, in model, method1: class vote < activerecord::base scope :average_score, ->(date1,date2) { where(date: (date1)..(date2) )} end now, on controller or view , can call like, @average = vote.average_score(date.today - 7 , date.today).average(:id) method 2: you can take method , call scope method. class vote < activerecord::base scope :average_score, ->(

javascript - Duplicate text from another form in real time -

okay probbaly question common, , many aks question , answer this. have (kinda) have problem. work if text vendor, text cgame follow text on vendor (keyup on real time), , can change on cgname (not affect text vendor). problem, when cgname empty or erase text wanna instaly text cgname text vendor mean duplicat text vendor cgname if text cgname erase or empty. how did that? code on jquery var cgname = $("#cgname"); $("#vendor").keyup(function() { cgname.val( this.value ); }); i'm really2 sorry if u dont understand me said, english really2 worst. update : many people miss understanding questio. i'm gonna cleary. 1. need duplictae text vendor text cgname 2. if text cganme erease or empty, go point 1. based on ahjeebon's answer think looking : $("#vendor").keyup(function() { $("#cgname").val( $(this).val()); }); $("#cgname").keyup(function() { var val = $(this).v

Service Fabric UpgradeOrchestrationService fails -

i testing service fabric on standalone windows server 2016 datacenter installation. the cluster consists of 3 nodes, running on single machine (similar configuration clusterconfig.unsecure.devcluster.json ). cluster version 5.3.301.9590. setting cluster worked without issues. after delay, upgradeorchestrationservice in system section of service fabric explorer enters warning state. application not installed. situation occurs directly after cluster setup. the following exception message displayed: unhealthy event: sourceid='runasync', property='runasyncunhandledexception', healthstate='warning', considerwarningaserror=false. system.fabric.fabricexception (-2147017720) message: exception hresult: 0xffffffff stacktrace: @ system.runtime.compilerservices.taskawaiter.throwfornonsuccess(task task) @ system.runtime.compilerservices.taskawaiter.handlenonsuccessanddebuggernotification(task task) @ system.fabric.common.fabricclientretry

jquery - Overflow hidden and scrolling -

Image
i'm looking create unusual scroll feature on homepage of website i'm not sure of best way tackle it. i have full screen panel ( panel 1 ) @ top (position:absolute, height:100%) background feature. when user on section, want overflow hidden. when user tries scroll (with mousewheel or arrow key), want page slide down (or in case, panel slide positioned absolute). i'd use cubic-bezier effect using css3. reveal panel 2 . here on, overflow should visible , should allow user scroll normal. once user scrolls , hits top of panel 2, want overflow return hidden , top panel slide down. apologies if difficult understand, i've tried explain in clearest way can think of! i've tried playing around waypoint.js, i'm sure if necessary make work. illustration might make point clearer. demo illustration i've found website has exact effect i'm looking for, dont know how they've created it. http://mariadelaguardia.com/ you can detect if scroll down d

Java Scanner delimiter on values of nextLine -

i have file in .dat format. here sample ||= (n ) =|| 1|| 0.938 || --- || 0.5 || (****)|| 0.5 || 0 || 0 || 0 || 0.700 || (p)=2212, (n)=2112 || ||= (\delta ) =|| 2|| 1.232 || 0.118 || 1.5 || (****)|| 1.5 || 0 || 0 || 3 || 1.076 || (\delta^{++})=2224, (\delta^+)=2214, (\delta^0)=2114, (\delta^-)=1114 || ||= (p_{11}(1440) ) =|| 3|| 1.462 || 0.391 || 0.5 || (****)|| 0.5 || 0 || 0 || 3 || 1.076 || 202212, 202112 || ||= (s_{11}(1535) ) =|| 4|| 1.534 || 0.151 || 0.5 || ( ***)|| 0.5 || 0 || 0 || 3 || 1.076 || 102212, 102112 || i trying use scanner read file , delimit line "||" , send , arraylist future processing. here sample of code use delimiter string file = "data.dat"; scanner s = null; try { s = new scanner(new file(file)).usedelimiter(&qu

javascript - SignalR proxy is undefined -

Image
why $.connection.connectionhub undefined, using webform. <script src="/scripts/jquery-1.6.4.min.js" "></script> <!--reference signalr library. --> <script src="/scripts/jquery.signalr-2.2.1.min.js"></script> <!--reference autogenerated signalr hub script. --> <script src="/signalr/signalr/hubs"></script> <!--add script update page , send messages.--> <script type="text/javascript"> $(function () { $.connection() // why undefined var chat = $.connection.connectionhub; ---------------------------hub class------------------------------ public class connectionhub : microsoft.aspnet.signalr.hub { public void hello() { clients.all.hello(); } public void sendmessage() { } } ------------------------scripts--------------------------------

javascript - Node is no working. "ReferenceError: requiere is not defined..." -

i trying make fisrt chat node , socket.io have error: pic console when usin code: var express = requiere('express'); var app = express(); var server = requiere('http').server(app); var io = requiere('socket.io')(server); app.get('/', function(requiest, response) { res.status(200).send("hola mundo!"); }); io.on('connection', function(socket){ console.log('alguien se ha conectado con sockets'); }); //server.listen(8080, '127.0.0.1'); server.listen(8080, function(){ console.log("servidor corriendo"); }); help, please! =´( it's not require , should require , won't requiest , should request . final code that: var express = require('express'); var app = express(); var server = require('http').server(app); var io = require('socket.io')(server); app.get('/', function(request, response) { response.status(200).send("hola mundo!"

Master - Detail Gridview column hiding Devexpress -

i have multiple parent-child gridview. problem parent gridview column name cost ($) , ($) symbol hiding when expand child gridview , when minimize child gridview (devexpress). parent-child gridview present in aspxcallbackpanel , in popupcontrol. <dx:aspxcallbackpanel id="cbpcartdetails" runat="server" oncallback="cbpcartdetails_callback" clientinstancename="cbpcartdetails"> <clientsideevents endcallback="cbpcartdetails_endcallback" /> <panelcollection> <dx:panelcontent id="pnlcartdetails"> <dx:aspxpopupcontrol clientinstancename="popcartdetails" width="600px" height="250px" closeaction="closebutton" maxwidth="800px" maxheight="800px" minheight="150px" minwidth="150px" id="popcartdetails" headerstyle-forecolor="white" headerstyle-

c# - Enable/Disable AD user with LDAP -

is possible enable (or disable) user in active directory ldap command? and also, possible doing c#? i've looked here , here thanks, j you can use principalcontext enable/ disable ad account. enable ad can this: private static void enableaduserusinguserprincipal(string username) { try { principalcontext principalcontext = new principalcontext(contexttype.domain); userprincipal userprincipal = userprincipal.findbyidentity (principalcontext, username); userprincipal.enabled = true; userprincipal.save(); } catch (exception ex) { console.writeline(ex.message); } } to disable active directory can set userprincipal.enabled = false;

How to build RPM of a selenium test automation project with maven? -

i have test automation framework test cases. want build rpm of whole project can installed on machine , can execute test. how can that? one approach use %check scriptlet in spec file run tests during build.

ruby on rails - Implement "add to favorites" -

Image
i creating app user can favorite room. started has_and_belongs_to_many association. noticed tricky implement remove button drestroy. decided time has_many through association. have users should add rooms favorite or wishlist. unfortunately when click on favorite button getting error: what missing how can make work? if need further information let me know. have used direction. implement "add favorites" in rails 3 & 4 favorite_room.rb class favoriteroom < applicationrecord belongs_to :room belongs_to :user end room.rb belongs_to :user has_many :favorite_rooms has_many :favorited_by, through: :favorite_rooms, source: :user user.rb has_many :rooms has_many :favorite_rooms has_many :favorites, through: :favorite_rooms, source: :room routes.rb resources :rooms put :favorite, on: :member end rooms_controller.rb before_action :set_room, only: [:show, :favorite] ... ... def favorite type = params[:type] if type == &quo

jquery - Moodle: Javascript errors preventing SCORM package loading? -

i'm new here , having issues on moodle site through provide online training. upload scorm packages moodle , have had issue stopping scorm packages loading or taking long time load. we receive scorm error "scorm player has determined internet connection unreliable or has been interrupted. if continue in scorm activity, progress may not saved. should exit activity , return when have dependable connection". however, have tried number of different internet points , devices, same problem reoccurring. therefore contacted our hosting provider, replied: "it appears issue coming fact there quite few javascript errors on site. pasting them below: failed load resource: net::err_failed chrome-extension://dliochdbjfkdbacpmhlcpmleaejidimm/cast_sender.js failed load resource: net::err_failed chrome-extension://enhhojjnijigcajfphajepfemndkmdlo/cast_sender.js failed load resource: net::err_failed chrome-extension://fmfcbgogabcbclcofgoc

rubygems - Tried - gem install bundler on windows and received following error - Could not find a valid gem 'bundler' (>= 0) -

full error message: not find valid gem 'bundler' (>= 0), here why: unable download data https://rubygems.org/ - ssl_connect returned=1 errno=0 state=sslv3 read server certificate b: certificate verify failed ( https://api.rubygems.org/latest_specs.4.8.gz ) i not able find adequate steps fix issue on windows, can please help? citing https://teamtreehouse.com/community/i-get-the-error-message-could-not-find-a-valid-gem-bundler-0-in-any-repository-how-can-i-fix-this-issue you behind firewall or virus software. need switch use http://rubygems.org,it remove https , add http if having issue have change in gemfile of test app or server won't run

Python: regex parse text to create dict -

i have problem 1 task: i have output cisco hw. ip access list 100 10 permit igmp any 20 deny any ip access list 200 10 permit ip 192.168.1.1/32 20 permit ip 192.168.2.1/32 30 permit ip 192.168.3.3/32 40 deny any the task make dict access list number key , access list rule number value. acl_dict = {'100' : '10', '100' : '20','200': '10', '200': '20', '200': '30', '200': '40'} i have written regex: rx = re.compile(""" list\s(.*)[\n\r] \s{4}(\d{1,3}).+$ """,re.multiline|re.verbose) match in rx.finditer(text): print (match.group(1)) print (match.group(2)) but shows number first 2 strings (100 , 10) need modify somehow regex match numbers make needed dict. can ? it's possible single met

python tkinter with threading causing crash -

i have written python tkinter code using threads tkinter wizard updates automatically tkinter mainloop running in main thread , background process running in separate thread. noticed, python crashes after time when running code. random in nature python crashes of time. have written small test code can show problem (my original code similar having real processes , many other features, sharing test code). ###################################################################### # test code tkinter threads import tkinter import threading import queue import time # data generator generate data def generatedata(q): in range(1000000): #print "generating data, iteration %s" %(i) time.sleep(0.01) q.put("some data iteration %s. putting data in queue testing" %(i)) # queue used storing data q = queue.queue() def queuehandler(widinst, q): linecount = 0 while true: print "running" if not q.empty():

php - Blocktrail API: Payments, always giving as canceled, and change the first line giving as processed. -

when buyer buys bitcoin first time, created txid in first line.. when buy bitcoin, payment in first line changed new txid (of new payment , processed) , new payments canceled. i'm using laravel. check in picture payments canceled the way have code this $new = new webhook; $new->hash = $txdata['data']['hash']; $new->wallet = $wallet; $new->vezes = $semanas; $new->valor = blocktrailsdk::tobtc($txdata['data']['estimated_value']); $new->pagamento = $pagar; $new->save(); $user = wallets::where('wallet', $wallet)->get(); foreach($user $usuario){ $id = $usuario->id_user; $invest = investimento::where('wallet', $wallet)->first(); $invest->hash = $txdata['data']['hash']; $invest->id_user = $id; $invest->wallet = $wallet; $invest->deposito = blocktrailsdk::tobtc($txdata['data']['estimated_value']); $invest->status = 'pendente'; $invest->save()

Fixing Bootstrap Affix to near standing column -

appreciate if can me. have several bootstrap rows, , 1 of them contain 2 columns - left scrollable text, , right description fixed affix. right column must shown when scroll down top of left column , hide when left column over. tried make work way, didn't work out. affix fixed body (and not top , bottom borders of parent block wanted). doing wrong? (except me speaking english :) ) index.html: ... <body data-spy="scroll"> ... <div class="chapter"> <div class="row" data-target="#myscrollspy"> <div class="col-md-5" > precious scrollable text </div> <div class="col-md-6" id="myscrollspy"> <div id="myaffix"> not working affix </div> </div> </div> </div> ... <script> $('#myaffix').a

c# - Starting WPF application with elevated privileges takes a long time as a normal user -

i have .net 4.5.2 wpf application requires administrator privileges. application has manifest file states application should run highest privileges: <requestedexecutionlevel level="requireadministrator" uiaccess="false" /> the application works fine when start (in windows 7 (this cannot upgraded)) , uac prompt when start application. however, application takes long time start when logged on normal user (some times 30 seconds), if user part of administrators group. when starting while logged on proper administrator user starts immediately. i've tried starting task scheduler administrator user, gui isn't displayed. done testing purposes , not final solution. why slow normal user, , can done fix this?

css3 - add a class atribute to an actionLink (HTML Helper) in asp.net mvc5 -

i want add class attribute actionlink , use sintax @html.actionlink("ادامه مطلب", "detaile", new { @class = "mycssclass" } ) but doesn't work html.actionlink("create new", "create", controllername, null, new { @class= "yourcssclass"} maybe you missing controller name

windows - MSDOS Scripted directory name with date and time -

i need files creating .zip directory. name of directory must have date(yyyymmdd) , time(hhmmss). below code: set folder_files_rar=c:\program files\zip set folder_save_files=in10xml_uploaded set datetime =%date:~6.4%%date:~3.2%%date:~0.2%%time:~0.2%%time:~3.2%% time:~6.2% set xml_uploaded_folder=c:\xml\uploaded set xml_uploading_folder=c:\xml\uploading set xml_files_extension=xml cls cd\ cd "%% folder_files_rar" rar m% xml_uploaded_folder% \% folder_save_files% _% datetime% .rar% xml_uploading_folder% \ *.% xml_files_extension% when run script file name out date (results below). time not come out , need skirt. in10xml_uploaded_yyyymmdd i need go out this: in10xml_uploaded_yyyymmdd-hhmmss how solve problem?

Android studio preview doesnt match the real screen -

im developing table in android studio. this relevant part of layout: <linearlayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent"> <scrollview android:layout_width="match_parent" android:layout_height="match_parent" android:id="@+id/scrollview" android:layout_gravity="center_horizontal" android:fillviewport="true"> <tablelayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:stretchcolumns="0" android:shrinkcolumns="1" android:background="#ffffff"> <textview