Posts

Showing posts from March, 2010

visual studio 2013 - How to define ReSharper file header for .cshtml files and .js files? -

for .cs source files possible define standard file header in resharper automatically inserted/updated when code cleanup called. is possible define similar .cshtml , .js files? answered on here: resharper: file header text not automatically used new files ...isn't possible in resharper https://youtrack.jetbrains.com/issue/rsrp-329925 https://youtrack.jetbrains.com/issue/rsrp-170107

php - Ajax link after infinite scroll not working -

i'm making bookshop more 100 books. through search function i'm loading 10 books @ same time. when user scrolls down infinite scroll function loads 10 new books (with ajax). next every book title buy link. ajax link adding book in shopping cart. <a href="/books/buy" onclick="return false"><i class="glyphicon glyphicon-circle-arrow-right" id="book<?php echo $bookid;?>"></i></a> <script type="text/javascript"> $(document).on("click","#book<?php echo $bookid;?>",function(){ $.ajax({url: "books/buy/<?php echo $bookid;?>", type:'post', }) }); </script> the ajax link first books working good. link books loaded infinite scroll not working. while trying find solution noticed when don't use bookid, icons have same id, ajax link working don't know book selected. , if don...

winapi - Autohotkey unable to kill a process -

i have facing issues svchost going out of control @ times , making system unstable. kill manually, decided write ahk script automatically everytime if starts using memory. #noenv ; recommended performance , compatibility future autohotkey releases. #warn ; enable warnings assist detecting common errors. #singleinstance force ;-------------------------------------------------------------- ; variables ;-------------------------------------------------------------- minmemmb = 200 mincpupercentage = 50 loop { process in comobjget("winmgmts:").execquery("select idprocess, percentprocessortime, workingset win32_perfformatteddata_perfproc_process name '%svchost%'") pid = % process.idprocess cpu = % process.percentprocessortime mem = % round(process.workingset/1000000) formattime, time if (cpu > mincpupercentage or mem > minmemmb) { process, close, %pid% sleep, 2000 if errorlev...

c++ - Missing functionalities when deploying Qt application -

i have created deploy folder qt gui application, have added .dll's screamed for. app running, there 2 functionalities missing. void mainwindow::on_action_about_triggered() { qstring filepatch = qapplication::applicationdirpath() + "/changelog.txt"; qfile f(filepatch); if (!f.open(qfile::readonly | qfile::text)) return; qtextstream in(&f); qmessagebox::about(this, tr("about testapp"), getappversion() + "\ntestapp\n\n" + in.readall()); } and qprinter printer; printer.setfullpage(true); printer.setpapersize(qprinter::a4); printer.setorientation(qprinter::landscape); if (specialtypes::printtype_t::eprint == ptype) { printer.setoutputformat(qprinter::nativeformat); qprintdialog printdial(&printer, this); if (printdial.exec() == qdialog::accepted) { textedit->document()->print(&printer); } } both dialogs not...

Login callback is not triggered using facebook-android-sdk 4 -

i have activity user login facebook. used facebook-android-sdk v4.0.0. login callback not triggered when user click on login button. after showing progress bar, start previous activity automatically without showing error on log instead of triggering login callback. in signupactivity, private callbackmanager callbackmanager; @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_sign_up); callbackmanager = callbackmanager.factory.create(); loginbutton loginbutton = (loginbutton) findviewbyid(r.id.login_btn); loginbutton.setreadpermissions(arrays.aslist("user_friends", "email")); loginbutton.registercallback(callbackmanager, new facebookcallback<loginresult>() { @override public void onsuccess(loginresult loginresult) { log.i("login : ", "success"); } @override public void onca...

ios - Open large book on iBooks from my app -

i'm opening book on ibooks app following code. i'm using xamarin code same don't think it's relevant. nsstring *stringurl = @"itms-books:"; nsurl *url = [nsurl urlwithstring:stringurl]; [[uiapplication sharedapplication] openurl:url]; my problem opening large books. in case around 800mb. after choosing "open with.." , selected "ibooks" takes lot of time..almost minute maybe until "jumps" ibooks app. normal? event after ibooks opened takes time load file. if normal..is there way progress of what's happening? user doesn't feel nothing happening.

android - DownloadMAnager Broadcast only DOWNLOAD_COMPLETE -

to improve comunication on different commponents want listen downloadmanager status. following reciever download_complete(success/failure) only,while alson need status pending, running, paused public class downloadreceiver extends broadcastreceiver{ private context context; private string tag = "downloadreceiver"; @override public void onreceive(context context, intent intent){ log.i(tag, "onreceive"); this.context = context; long downloadid = intent.getlongextra(downloadmanager.extra_download_id, -1); log.i(tag, "downloader id: "+downloadid); checkdownloadstatus(downloadid); } private void checkdownloadstatus(long id){ downloadmanager downloadmanager = (downloadmanager) context.getsystemservice( context.download_service ); cursor cursor = context.getcontentresolver() ...

winapi - gethostbyname and endianness - how are the bytes returned? -

Image
on (intel) x86 machine, i've noticed if printf results of gethostbyname localhost , 100007f , though msdn documentation states should return ip in network byte order, aka big endian. searched bit , found this topic . based on answers there, i've deduced sequence of bytes same no matter endianness, so, localhost , i'd have in memory on both intel , amd chips: 7f|00|00|01 thus, reading memory intel chip results in 'reversed' result, while on amd cpu, i'd 0x7f000001. assumption correct? seems possible explanation, want make sure. this code i'm using: #define win32_lean_and_mean #include <winsock2.h> #include <ws2tcpip.h> #include <stdio.h> // need link ws2_32.lib #pragma comment(lib, "ws2_32.lib") int main(int argc, char **argv) { //----------------------------------------- // declare , initialize variables wsadata wsadata; int iresult; dword dwerror; int = 0; struct hostent *remoteho...

Java 'Import' Utility Not Working -

instead of producing output, code throws error on line i've used 'import' utility. don't know how remove error. please help! i'm novice. read code in 'head first java' sierra. import java.util.*; public class dotcombust { private gamehelper helper = new gamehelper(); private arraylist < dotcom > dotcomslist = new arraylist < dotcom > (); private int numofguesses = 0; private void setupgame() { dotcom 1 = new dotcom(); one.setname("pets.com"); dotcom 2 = new dotcom(); two.setname("toys.com"); dotcom 3 = new dotcom(); three.setname("go.com"); dotcomslist.add(one); dotcomslist.add(two); dotcomslist.add(three); system.out.println("sink coms"); system.out.println("jk yhhg jyhhj "); system.out.println("in small no of guesses"); (dotcom dotcomtoset: dotcomslist) { ...

wpf - Rehosted WF4 Delete Activity scenario -

in order reach context of assign activity, hosted custom activity follows : <sap:activitydesigner x:class="ariasquiblibrary.design.customasigndesigner" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:sap="clr-namespace:system.activities.presentation;assembly=system.activities.presentation" xmlns:sapv="clr-namespace:system.activities.presentation.view;assembly=system.activities.presentation" xmlns:statements="http://schemas.microsoft.com/netfx/2009/xaml/activities" collapsible="false"> <sap:activitydesigner.template> <controltemplate targettype="sap:activitydesigner"> <grid> <contentpresenter horizontalalignment="center" verticalalignment="center"/> </grid> </controltemplate> </sap:activi...

javascript - Waypoints: do something if offset is less than something -

i want toggle navbar class if body offset less -20px using waypoints plugin. the code below doesn't work because offset values undefined. is there way retrieve body offset value using waypoints? $("body").waypoint(function() { if (offset > -20px) { $(".navbar-toggle").on('click', function() { $(".navbar").toggleclass("navbar-default navbar-inverse"); }); } }); .offset() returns object containing properties top , left . $("body").waypoint(function() { var offsettop = $('body').offset().top; // top offset var offsetleft = $('body').offset().left; // left offset if (offsettop > -20) { // or offsetleft > -20 out `px` $(".navbar-toggle").on('click', function() { $(".navbar").toggleclass("navbar-default navbar-inverse"); }); } });

vba - Excel macro to find text value in sheet, copy the respective column, and paste whole column on another sheet -

i have set excel file paste data workbook sheet 1 , , sheet 2 set show values using a1 =if(not(isblank(sheet1!b1)),sheet1!b2,"") throughout whole sheet (with cell references changing according needs). normally work me fine, problem when download new raw data , copy sheet 1 , columns in sheet 1 have moved on me due addition of random new columns , formula sheet 2 breaks set reference respective column sheet 1 have selected, rather actual data need. below example: sheet 1 (day 1) (simply copying raw data workbook) | | b | c | d | e | f | --+-------+-------+-------+-------+-------+-------+ 1 | cat 1 | cat 2 | cat 3 | cat 4 | cat 5 | cat 6 | 2 | 1a | 1b | 1c | 1d | 1e | 1f | 3 | 2a | 2b | 2c | 2d | 2e | 2f | 4 | 3a | 3b | 3c | 3d | 3e | 3f | sheet 2 (day 1) (desired output using noted formula) | | b | c | --+-------+-------+-------+ 1 | cat 2 | cat 6 | cat 4 | 2 |...

ios - How to resize the UITableView row height in Objective C -

in app have requirement saving data in itemsarray in following format like iphone ipad ipod touch and same data tryin display in uitableview but taking first item i.e iphone it not displaying remaining items in itemsarray. i have been trying not able find solution it. can please me solve this. i new objective c. thanks in advance. if want 3 items in single cell create 1 dictionary follows: nsmutablearray * contentsarray = [nsmutablearray array]; nsmutabledictionary * allcontacts = [nsmutabledictionary dictionary]; for(int = 0; < youritemarraycount; i++) { [allcontacts setobject:[youritemarray objectatindex:i] forkey:@"key %@",[[youtitemarray objectatindex:i] stringvalue]]; } [contentsarray addobject:allcontacts]; then in following method -(uitableviewcell *)tableview:(uitableview *)tableview cellforrowatindexpath:(nsindexpath *)indexpath{ //write dictionary logic here nsdictionary *dict = [contentsarray objectatindex:...

javascript - How to move up the st, nd, rd in the date using c#? -

my output format date 14th may 2015 . but output want in 14 th should raise little bit using c#. strbuilder.appendformat(@"<tr><td>delivery date & time</td><td align='left' style='text-align:left;'>- {0}</td></tr>", (string.isnullorempty(txtdeliverydate.text) ? "" : (string.isnullorempty(txtetime.text) ? common.convertvaliddateformat(txtdeliverydate.text).tostring("dd mmm yyyy") : common.convertvaliddateformat(txtdeliverydate.text).tostring("dd mmm yyyy") + " @ " + txtetime.text))); the <sup> tag need. in event don't want so. can use css position: relative; top: -0.5em; font-size: 80%; demo http://jsfiddle.net/j8au1pk3/ also check out this question

winforms - How to add a WPF user control which is created in control library into Win-forms element host -

Image
this actual requirement need add wpfmediakit existing winforms application. so in-order need add wpfcontrol winform's application. my final objective : camera application capturating , saving , mail features. add windowsformintegration reference , gives access control called elementhost . control wpf in winforms windowsformshost winforms in wpf. in designer, can find control in toolbox underneath "wpf interoperability".

Send ESMTP emails using PHP by direct SMTP -

i have mail server on synology diskstation. want send emails using php php mail function not work. have read synology mail server uses esmtp , php uses sendmail mail function not work , need build message using direct smtp. found this: <?php function mymail($from, $namefrom, $to, $nameto, $subject, $message) { $smtpserver = "xxx.xxx.xxx.xxx"; $port = "25"; $timeout = "45"; // typical timeout. try 45 slow servers $username = "user@example.com"; $password = "secret"; $localhost = "example.com"; $newline = "\r\n"; $secure = 0; $smtpconnect = fsockopen($smtpserver, $port, $errno, $errstr, $timeout); $smtpresponse = fgets($smtpconnect, 4096); if(empty($smtpconnect)) { $output = "failed connect: $smtpresponse"; echo $output; return $output; } else { $logarray['connection'] = "<p>connected to: $smtpresponse"; ec...

html - Last-Child inside div not working -

i , using addthis share plugin , have changed background color yellow , added bottom-border: of 1px , want remove bottom border last not working me using following css css div#at4-share a:last-child { border-bottom: 0px solid #1f1f1f; } html <div id="at4-share" class="addthis_32x32_style atss atss-left addthis-animated slideinleft at4-show"> <a class="at4-share-btn at-svc-facebook" href="#"> <span class=" at4-icon aticon-facebook" title="facebook">facebook</span> </a> <a class="at4-share-btn at-svc-twitter" href="#"> <span class=" at4-icon aticon-twitter" title="twitter">twitter</span> </a> <a class="at4-share-btn at-svc-pinterest_share" href="#"> <span class=" at4-icon aticon-pinterest_share" title="pinterest">pinterest</span> </a> ...

javascript - Can one event listener prevent another from firing? -

i'm writing chrome extension injects content script page. script adds event listener select element on page routine can executed whenever selects new value drop-down. i've tried adding event listener both "normal" js method: document.getelementbyid('myselect').addeventlistener('change', dosomething); ...and jquery method: $('#myselect').change(dosomething); neither seems work; event never fires. by inspecting element chrome's developer tools, i've discovered element has event listener on it, created script running on page. know listener functioning because resulting script logs data console. i'm wondering if existing listener somehow "absorbing" change event , preventing reaching own listener. oddly enough, when turn on monitorevents element, logs no events @ of type (not things shouldn't affected, mouseover). any thoughts?

android - All my Toasts' text are being displayed off center -

Image
how fix this? have not done theme textappearance - using appcompatactivity , theme.appcompat.noactionbar . bug in support library? setting android:fitssystemwindows == true in theme caused this

C# Execute Perl Script - Syntax issue? -

as title says, having issues executing particular perl script c# program. have done in past , within same program. however, particular script resulting in load of "invalid operation exception: no process associated object." the troubled code snippet below. exceptions thrown @ "perl.startinfo = perlstartinfo;" public void parsereviews(string asin) { string args = @"'c:\\users\\cody\\documents\\amazon-downloader-master\\extractamazonreviews-divlayout.pl '" + "'c:\\users\\cody\\documents\\amazon-downloader-master\\amazonreviews\\com\\'" + asin + "'\\ > c:\\reviews.csv'"; processstartinfo perlstartinfo = new processstartinfo(@"c:\perl\bin\perl.exe"); perlstartinfo.arguments = args; perlstartinfo.useshellexecute = false; perlstartinfo.redirectstandardoutput = false; perlstartinfo.redirectstandarderror = true; perlstartinfo.creat...

python - Why does tkinter.ttk Combobox clear displayed value on initial selection only? -

i building gui in tkinter , seeing curious behaviour ttk.combobox . initializes fine, when select item dropdown, combobox display clears. happens first time make selection. start app > make selection > display clears > make selection > diplays normal. here's code (only pertinent parts brevity). combobox class fetches column database list , assigns values. otherwise, pretty straighforward tkinter. import tkinter tk tkinter import messagebox tkinter import ttk tkinter import n, s, e, w tkinter import end, center import dbmanager class maingui(tk.tk): """main gui class engcalc.""" def __init__(self, db_mngr): """see class docstring.""" self.db = db_mngr tk.tk.__init__(self) tk.tk.wm_title(self, 'engcalc') self.init_root_frame(master=self) def init_root_frame(self, master=none): """create , initialize main gui cont...

Importing system modules in python -

background: i'm writing symbolic package aimed @ pypy representing expressions , taking derivatives. not working on simplification or @ moment, differentiation , evaluation. question: i'm writing expression classes represent many of functions in math (sqrt, log, exp, sin, cos, etc, etc). have named module goes in math coincide module natural find said function. may in future same cmath , other module of particular mathematical interest. module part of larger package ldb.algebra name math isn't going collide @ base namespace. however, in order evaluate expressions i'm going need import system math module inside ldb.algebra.math module, , can't inside math module (or other module @ same level of package matter). here's basic path far: ldb/ __init__.py - empty algebra/ __init__.py - empty math.py contents of ldb/algebra/math.py example of problem: import math my_sin = math.sin obviously not terribly useful shows ide...

c# - Elasticsearch PUT documents in strange order -

how set elasticsearch adding new documents put method @ end (or beginning). now it's adding new ones @ end, in middle. i know can sort results field, want see them in browser ordered time added without additional parameters es document store, i.e. there's no inherent insertion order. i'd go adding ?sort=yourdatefield:desc url , you're set. if don't add specific sort field, sort score defaults 1.0, order undefined actually.

Cognos 10 Crosstab filter on individual column -

i have searched cant seem find specific problem. i struggling put filter on column in crosstab 2 columns use same data. both use data project count 1 requires filter view active projects. (in our data have predefined filter viewing active projects.) can please i'm new cognos thorough explanation appreciated. | <#project count#> | <#project count#> <#project manager#> | <#1234#> | <#1234#> one way following: create 2 crosstabs in report - 1 active project filter, 1 without. create queries need, 'behind scenes'. in query explorer, click on queries - opens query pane. drag 'join' toolbox query explorer. in 2 blank spaces join, drag in each of queries created crosstabs. double click on join , create link between project manager in each query. now, double-click query on left of join edit query. drag project manager , project count 1 of queries in source pane, , proje...

sql - Add GridView Button Dynamically -

i have asp.net form button1 , gridview1. when click button1, performs "select * table" query , dumps output gridview1. //update gridview1 gridview1.datasource = _datatable; gridview1.databind(); i have set autogeneratecolums property ti true work. but want each row in gridview, want create new column called "click" contains button each row. //refetch data datacolumn dc = new datacolumn("click", typeof(buttonfield)); _datatable.columns.add(dc); buttonfield _buttonfield = new buttonfield(); _buttonfield.buttontype = buttontype.button; _buttonfield.text = "testing"; _datatable.rows[0].setfield("click", _buttonfield); //update gridview gridview1.datasource = _datatable; gridview1.databind(); its not working. help change code this. add button on gridview. can handle click event , write select code. buttonfield buttonfield = new buttonfield { buttontype = buttontype.button, text = "test...

How to test push notification on the Apple watch? -

Image
i'm able test push notification using apple watch simulator , "pushnotificationpayload.apns" file selecting notification: how test push notification on actual apple watch? --> i've tried use exact steps simulator. apple watch launch app, bypassing notification view. the apns file available testing in simulator. doesn't work on real device. you'll have test push notifications same way ios app: sending push notification device.

c# - WebSocket serverSocket.Accept() doesn't trigger -

i trying send strings server using synchronous websockets in c# console application. following code works flawlessly on 127.0.0.1 doesn't work on real server tried. result client connects ip/port , sends strings no errors, _serversocket.accept(); never triggers when _clientsocket.connect(_ip, _port); called. also, if serversocket.bind(new ipendpoint(ipaddress.any, _port)); not called, sender gets error ( as expected ) when trying connect. seems should work , port working. i tried using variety of servers. 1 in sample code below taken https://server.pro/ so, question is, why doesn't _serversocket.accept(); trigger, since sender can connect , send strings no errors ? private static socket _serversocket, _clientsocket; private const int _port = 40288; //this ip doesn't work, 127.0.0.1 works flawlessly private static ipaddress _ip = ipaddress.parse("37.187.143.226"); //---------sender (client) code--------- _clientsocket = new socket(addressfami...

css - content added to parsys displays outside of containing html. How can I get it to show inside it? -

i'm trying create adobe cq component , include parsys element users can drag other components into. however, when drag items parsys component display outside of html tags wrapped around include. doing wrong? html in component jsp <div class="div-one"> div 1 </div> <div class="div-two"> <cq:include path="par" resourcetype="foundation/components/parsys" /> </div> content.xml component <?xml version="1.0" encoding="utf-8"?> <jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" jcr:description="" jcr:primarytype="cq:component" jcr:title="title" sling:resourcesupertype="foundation/components/parbase" allowedparents="[*/parsys]" componentgroup="my group" cq:htmltag=...

jquery - Javascript Math.floor issue between specific range of numbers -

i'm facing issue math.floor function of javascript below scenario: 1) value betwwen 8192 , 10484, if type 8192.8 -> math.floor converts 8192.79 if type 8192.88 -> math.floor converts 8192.87 if type 8192.3 -> math.floor converts 8192.29 strange part except range given above function works fine. html: <div data-bind="text: popincrease"></div> <input type="text" data-bind="value: userinput, valueupdate: 'afterkeydown'" /> javascript: var viewmodel = function () { var _self = this; _self.userinput = ko.observable(); _self.popincrease = ko.computed(function () { return parsefloat((math.floor(_self.userinput() * 100) / 100)).tofixed(2); }); }; ko.applybindings(new viewmodel()); jsfiddle: https://jsfiddle.net/91z5bdy4/1/ when changed 100 1000 solved error not understand why happened on first place? you can switch this: return parsefloat(_self.userinput()).tofixed(2); ...

html - Sticky Position: Header scrolled away after a while -

on website have made <nav> stick top, sticks few seconds / pixels when scroll down, gets scrolled away, please see code snippet below , scroll down. want nav stick top time when scroll down, except when <header> visible. html <!doctype html> <html> <head> <title>danis website</title> <link href="reset.css" type="text/css" rel="stylesheet"> <link href="style.css" type="text/css" rel="stylesheet"> </head> <body> <div id="wrapper"> <header> <h1>danis website</h1> </header> <nav> <ul> <li><a href="index.html">home</a></li> <li><a href="rezepte.html">rezepte</a></li> ...

regex - How to make an "or" statement in a java Pattern? -

so, , working on program extracts answers html code , stores them array. problem when try make pattern in order separate answers , can't seem make 'or' statement. the answers stored on html code: ['h','e','l','l','o',' ','w','o','r','l','d'] my problem when write string 1 space( ' ' ) not recognized pattern, when write file shows helloworld , no spaces. want pattern simultaneously detects letters , spaces , have no idea of how make 'or' statement in middle of pattern. this pattern right now, detects letters: pattern p= pattern.compile("'[a-z]+'"); edit: still doesn't work...do think might else? here's part of code( sorry, know it's mess): // creates string containing letters separated ' ' public static string createstring(bufferedreader in,bufferedwriter out, string texto) throws ioexception{ stringbu...

wordpress - How to group elements in the adminpanel (custom type posts) -

Image
good afternoon. prompt huk group admin dashboard submenu. as looks now as want looked |cyprus (main) |-->news (sub) |-->cities (sub) |-->villages (sub) |-->stories (sub) you can using show_in_menu paramiter when registering custom post type. $args = array( 'public' => true, 'show_ui' => true, 'query_var' => true, 'rewrite' => true, 'capability_type' => 'post', 'hierarchical' => false, 'show_in_menu' => 'edit.php?post_type=a_master_post_type', 'menu_position' => 30, 'has_archive' => true ); register_post_type('your-post-type',$args); instead of using 1 post type page main link create new menu item , reference in each of post type's show_in_menu paramiter. 'show_in_menu' => 'your-custom-menu-slug.php' and create new menu item. function add_your_menu() {...

list - PHP - Best way to print multiplication table -

basic php. decided print list of 10 multiples of 17.5, like: 17.5 | 35 | 52.5 | 70 | 87.5 | 105 | 122.5 | 140 | 157.5 | 175 | so first used loop: <?php $number = 17.5; $result = 0; $i = 0; while ($i < 10) { $result += $number; echo $result.' | '; $i++; } well, works. switched this, quite shorter: $i = 1; $result = 17.5; while ($i <= 10) { echo $result * $i.' | '; $i++; } but i'm sure there better way. what's best syntax? $results = array(); ($i = 1; $i <= 10; $i++){ $results[] = $i * 17.5; } echo implode(' | ', $results); or better echo implode(' | ', range(17.5, 17.5*10, 17.5));

python - My program comes back with either "Unexpected EOF while parsing" or "Expected indented block" both as syntax errors -

here small terminal-style program had been working on, stopped because of issues code.(written in python 3.4.1) this? import time import sys import os #this next part restarts program in case of invalid user/pass combination def restart_program(): python = sys.executable os.execl(python, python, * sys.argv) #definitions of strings in lists h = 'h' d = 'd' ma = 'ma' me = 'me' c = 'c' = 'a' l = 'l' yes = 'yes' no = 'no' y = 'yes' n = 'no' yes = 'yes' no = 'no' yes = 'yes' no = 'no' yes = 'yes' no = 'no' yes = 'yes' yes = 'yes' yes = 'yes' yes = 'yes' #string lists varlist1 = [d,ma,me,c,a,l,h] yes = [yes,y,yes,yes,yes,yes,yes,yes,yes] no = [no,n,no,no,no] admin = 'admin' deerfield = 'deerfield' password = 'password' cmenasco = 'cmenasco' cyape = 'cyape' guest = '...

encode - decoding .raw voip data to opus -

i have got capture file (pcap) rtp packets seems encoded opus. in wireshark, analyzed stream , saved raw file. have got .raw file of audio. using opus tool http://www.opus-codec.org/downloads/ cannot decode direct wav because file raw,not .opus. cannot encode .opus because raw data extract of encoded stream. need play voice back. suggestions please as far know won't able decode opus stream extracted way - framing information lost. need either write wireshark module able decode opus or write tool extract stream rtp container (typically ogg used). http://xiph.org/~giles/2012/rtpopus.c seems tool need.

iOS 8 UICollectionViewLayout Switching Mysterious Crash in Swift -

i new working uicollectionview . trying switch uicollectionviewlayout grid list , vice versa using below code: @ibaction func switchlayout(sender: anyobject) { isgridlayout = !isgridlayout collectionview?.reloaddata() if isgridlayout { collectionview?.performbatchupdates({ () -> void in self.collectionview?.collectionviewlayout.invalidatelayout() self.collectionview?.setcollectionviewlayout(self.gridlayout, animated: true) }, completion: { (completion) -> void in }) } else { collectionview?.performbatchupdates({ () -> void in self.collectionview?.collectionviewlayout.invalidatelayout() self.collectionview?.setcollectionviewlayout(self.listlayout, animated: true) }, completion: { (completion) -> void in }) } } i consistently below crash on setcollectionviewlayout:animated: method, don't understand. ...