Posts

Showing posts from May, 2011

Haskell - Lempel-Ziv 78 Compression - very slow, why? -

so i've finished lempel-ziv compression/decompression, compared c++ unbelievably slow, i've tried on http://norvig.com/big.txt file, program can't process it, while in c++ took 1 second. of haskell gurus @ code , tell me if there obvious flaws? after adding prepending instead of appending, managed reduce time 16 seconds 0.4! haskell's laziness deceiving, printing 'compression finished' immediately, in fact compression made program run slow import system.io import control.monad import qualified data.map map import debug.trace main = contents <- readfile "plik.txt" let compressed = reverse $ compress contents map.empty 1 "" [] let decompressed = reverse $ decompress compressed map.empty 1 "" --print $ contents print $ length compressed print $ length decompressed --print $ contents == decompressed compress :: string -> map.map string int -> int -> string -> [(int,char)]-> [(int,char)...

In Oracle SQL, how can I display a blank row between every unique row? -

suppose have simple query like: select employee, item_type, count(item_type) hr_database so output may like bob mugs 4 bob pencils 10 cat mugs 2 cat paperclips 7 sal mugs 11 but readability, want put blank row between each user in output(i.e readability), : bob mugs 4 bob pencils 10 cat mugs 2 cat paperclips 7 sal mugs 11 is there way in oracle sql ? far, i found link doesn't match need . i'm thinking use in query? thanks ! you can in database, type of processing should done @ application layer. but, kind of amusing trick figure out how in database, , specific question: with e ( select employee, item_type, count(item_type) cnt hr_database group employee, item_type ) select (case when cnt not null employee end) employee, item_type, cnt (select employee, item_type, cnt, 1 x e union select distinct employee, null, null, 2 x e ) e order e.employee, x; i emphasize, th...

html - Python, lxml and xpath: returns "[<Element x at 0x29a9998>] rather than expected value -

i'm trying scrape td asset management pages (example below; can't post more 2 links) in order retrieve "price on" value, i.e. dollar amount in snippet of html: <div class="td-layout-grid9 td-layout-column td-layout-column-first"> price on: jun 12, 2015 <br> <strong>$14.54 </strong> <strong class="td-copy-red">-0.01 (-0.07%)</strong> </div> i hoping achieve python, requests, lxml, , xpath, installed follows: apt-get update apt-get install python python-pip python-dev gcc build-essential libxml2-dev libxslt-dev libffi-dev libssl-dev pip install lxml pip install requests pip install requests[security] next, retrieve page did this: python >>> lxml import html >>> import requests >>> page = requests.get('https://www.tdassetmanagement.com/funddetails.form?fundid=6320&lang=en') >>> tree = html.fromstring(page.text) finally, attempt made retrieve desi...

vb.net 2010 - Deserialize JSON keep getting null referance exception -

okay, want deserialize json https://openrct.net/ajax/chat.php . problem no matter try, end null reference exception when try access stored data. have been trying close hour, googling , trying different things, , @ loss how this. please me out. imports newtonsoft imports newtonsoft.json imports newtonsoft.json.linq imports system.net public class form1 dim ws new webclient '/ajax/chat.php 'and /ajax/chat.php?latest=55 chat messages after id private sub form1_load(sender object, e eventargs) handles mybase.load end sub public class postwrapper public posts() post end class public class post public property a() string public property m() string public property t() string end class private sub button1_click(sender object, e eventargs) handles button1.click dim json string = ws.downloadstring("https://openrct.net/ajax/chat.php") msgbox(json) dim postwrapper = jsonconvert.deserializeobject(of postwrapper)(json) ' deserialize array o...

c - Arrays in board game program -

so, have been trying program game, in user has enter score wants play to. array did can see below ( score[4] = {0, 0, 0, 0} ). but somehow get, when use score[relplayers(a counter in array, programm passes turns)] = score[relplayers](the old score) + thrown (value of dice rolled); have no idea why doesn't work. #include <stdio.h> #include <stdlib.h> #include <time.h> int throwing () { srand(time(null)); int value = rand() % 6 + 1; return value; } int main() { int abplayers, relplayers, thrown, playersshown, abscore, rounds; printf("enter number of fields: "); scanf("%d", abscore); int score [4] = {0, 0, 0, 0}; (rounds = 0; rounds < 50; rounds++) { for(relplayers = 0; relplayers < 4; relplayers++) { int playershown = relplayers + 1; getchar(); thrown = throwing(); printf("\nplayer nº%d threw %d", playershown, thrown); score[relplayers] = score[relplayers] + t...

file io - Why we always have to use fgetc command in C programming instead of fscanf which do the same thing but prints strange results? -

in c programming whenever use fgetc(file) read chars until end of file works. when use similar fscanf(file, "%c") function prints strange characters. code: #include <stdio.h> #include <stdlib.h> int main() { char c; file * file = fopen("d\\filename.txt", "r"); while (c != eof) { fscanf(file, "%c", &c); printf("%c", c); } return 0; } but when use fgetc instead of fscanf , works. , prints each character present in file. can answer why works this? notice c=fscanf(file,"%c"); is undefined behavior ( here explaining why should afraid of it, when program seems apparently "work"), , every c compiler (e.g. gcc invoked gcc -wall -wextra -g ) should warn (if enable warnings). when coding in c should learn how use debugger (e.g. gdb ). you should read documentation of fscanf(3) . want code char c= '\0'; if (fscanf(file, "%c...

javascript - How can I add this function in my Meteor project -

i installed type.js package , when type code directly in console works: $(function(){ $(".typedelement").typed({ strings: ["you don't have projects yet", "start adding project."], typespeed: 0 }); }); }); however how can add on js file works end client see it? i try registering template helper , calling helper insdide template returns object, help? thanks plugins should initialized in template's onrendered callback. example: template.mytemplate.onrendered(function() { $(".typedelement").typed({ strings: ["you don't have projects yet", "start adding project."], typespeed: 0 }); });

graphics - How colorize Circles in a plot in MATLAB? -

Image
i have matlab code follows: minval = -1; maxval = 1; maxradius = 0.5; ncircles = 5; dimension = 2; circles = zeros(ncircles, dimension); radius = zeros(ncircles, 1); = 1 : ncircles circles(i,:) = unifrnd(minval, maxval, [1, dimension]); radius(i) = unifrnd(0, maxradius, 1); end t = 0 : .1 : 2 * pi; figure; hold on; = 1 : ncircles x = radius(i) * cos(t) + circles(i,1); y = radius(i) * sin(t) + circles(i,2); plot(x,y); end axis square; grid on; the output circle as: now, want colorize these circles different colors. not solve matter. appreciate contribution simple code. approach 1: using rectangle , solid colors. circles may covered the simplest (although not intuitive) way plot circles use rectangle function 'curvature' property set [1 1] . have circles filled, specify color via 'facecolor' property. color of circle border controlled 'edgecolor' property. since circles colored, may have of them partly or covered other circles. m...

regex - PHP Regular expression match multiple keywords Where last keyword is optional -

i have following text , need find part of text after specific keyword apple tasty fruit orange cool mango used make shakes banana healthy food here regular expression /apple(.*)orange(.*)mango(.*)banana(.*)/is here output array( 0 => array(0 => apple tasty fruit orange cool mango used make shakes banana healthy food) 1 => array(0 => tasty fruit) 2 => array(0 => cool) 3 => array(0 => used make shakes) 4 => array(0 => healthy food) ) it works fine if keywords in string apple, orange, mango, , banana. want regular expression still work if last keyword banana not provided. apple tasty fruit orange cool mango used make shakes array( 0 => array(0 => apple tasty fruit orange cool mango used make shakes) 1 => array(0 => tasty fruit) 2 => array(0 => cool) 3 => array(0 => used make shakes) ) method 1 use ? quantif...

Template template parameter partial specialization c++ -

consider code: template<template<typename,typename> class container> class { template<class u, class allocator> void foo(container<u, allocator>*, u); }; now want specialize a in case container map value , comparator known, , create definition of foo in case (no specialization of foo ). tried this: template<typename v, typename comp> template<class u, class allocator> void a<std::map<typename, v, comp, typename>>::foo(map<u, v, comp, allocator>*, u ) {...} but compiling error: c3200: 'std::map<int,v,comp,int>' : invalid template argument template parameter 'container', expected class parameter. i have looked online , found similar issues, couldn't find way specify partial template parameter list of template template. there way it? edit: problem when giving template class partial specialization make behave template remaining parameters. here it's attempt think of map<*,known1...

java ee - How to create JBoss EAR project with JPA, EJB and CDI elements -

i'm trying create ear project ejb, jpa , web elements. have connection database , think works fine. not able @inject beans ejb project. here's configuration: in ear project earcontent/meta-inf/application.xml: <?xml version="1.0" encoding="utf-8"?> <application xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xsi:schemalocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/application_7.xsd" id="application_id" version="7"> <display-name>fantasy</display-name> <module> <ejb>fantasyejb.jar</ejb> </module> <module> <web> <web-uri>fantasyweb.war</web-uri> <context-root>fantasyweb</context-root> </web> </module> </application> in ear project earcontent/web-inf/jboss-deployment-structure.xml: <...

c++ - How can I copy one vector to another through different classes -

i'm trying make program in want copy 1 defined vector another, in different, inherited class. it's this: //map.cpp void map::setquantity() { std::cout << "set quantity: "; std::cin >> quantity; } void map::setarray(){ for(int i=0;i<quantity;++i) { citymap.push_back(city()); } } void map::showmap(){ for(int i=0;i<quantity;++i){ citymap[i].showcoords(); } } double map::getlength(int a, int b) { return sqrt(pow(citymap[a-1].getcoordx()-citymap[b-1].getcoordx(),2)+pow(citymap[a-1].getcoordy()-citymap[b-1].getcoordy(),2)); } int map::getquantity() { return quantity; } map::map() { } map::~map() { } //city.cpp int city::randomize(int range) { return rand()%range + 1; } void city::setcoords(){ coord_x = randomize(1000); coord_y = randomize(1000); } void city::showcoords(){ std::cout << "x = " << coord_x << " y = " << coord...

java - Placing a restart button on my screen -

i have created "game over!" page when user loses in game. under g.drawstring(...), trying create button user can click restart game. having trouble getting button appear , stay visible. how can create jbutton in custom paint(graphics g) method in java? suggestions? import java.awt.event.*; import javax.swing.*; import java.awt.*; public class game extends jpanel implements keylistener { private player player; private stage stage; private stage stageleft; private stage stageright; private enemymanager manager; private boolean isgameover = false; private boolean restart = false; public game() { setsize(800,600); setpreferredsize(new dimension(800,600)); setfocusable(true); setbackground(color.white); requestfocus(); addkeylistener(this); stage = new stage(0, 540, 800, 100); stageleft = new stage(-1, 0, 1, 600); stageright = new stage(800, 0, 1, 600); play...

php - Laravel sum() method on collection returning results for all items in table -

given following table gallery +----+---------------+--------------+---------+ | id | gallery_title | viewcount | user_id | +----+---------------+--------------+---------+ | 1 | animals | 10 | 1 | | 2 | cars | 5 | 1 | | 3 | houses | 2 | 2 | +----+---------------+--------------+---------+ user +----+----------+ | id | username | +----+----------+ | 1 | bob | | 2 | james | +----+----------+ and following classes class gallery extends model .... public function user() { return $this->belongsto('app\user'); } and class user extends model .... public function galleries() { return $this->hasmany('app\gallery'); } calling $gallerycollections= auth::user()->galleries; returns array of collections in can iterate through foreach ($gallerycollections $gallerycollection) { $viewcount += $gallerycollection->vie...

java - NoClassDefFoundError after importing package -

i have program on codeboard.io @ following link https://codeboard.io/projects/5714 aim of project is:- implement employee class , 3 child classes (managementemployee, engineeringemployee , administrationemployee), necessary attributes , methods. not include other attribute or method apart ones described. write staff class, first creates array employees in company, , prints complete staff list on screen. class must calculate , print total salary each of 3 departments. after nighter able rid of compilation error , write thought correct program reason noclassdeffounderror when run this, have guesses why happening, because have created packages , imported them in executing class still no result. appreciated, p.s. couldnt post codes here becasue reason formatting off uoi direct link program here can see files have made , run program edit it.

java - Do I need next() for a ResultSet with one row? -

i have following code statement stmt = sqlhelper.initializedb(); string query = "select status " + "from books " + "where bookid = '" + bookid + "'"; resultset rs = stmt.executequery(query); result = rs.getstring(1); rs.close(); sqlhelper.closeconnection(); do need use rs.next()? sure there going 1 row of data because bookid must unique in table. default, cursor of resultset starts before first row i'm not sure if need next() or not. yes need next() a resultset object maintains cursor pointing current row of data. cursor positioned before first row ...

javascript - Ember frontend with node backend - development practices -

i'm developing ember frontend node backend. in ember-cli app have .ember-cli file set proxy requests node: { "proxy": "http://localhost:3000" } i've had set whole bunch of rules in contentsecuritypolicy avoid cross site issues. i start ember ember server , proxy ajax requests node backend - although proxies ajax requests other libraries such facebook node (which fail 404s). the ember content served http://localhost:4200/ i have static landing page served directly node can access via http://localhost:3000/home is there better way set more in production of content served 1 address? or have develop in isolated mode? a proxy in front of both apps might trick, still need contentsecuritypolicy things nothing different perspective. in latest application i've been using ember.js frontend , node.js + express + mongodb backend. i'm running 2 servers - nginx /dist directory(static files, images etc.) on port 80 , node server a...

python formatting return value of subprocess -

i attempting on python 2.6.6 routing table of system (for interface) python list parse; cannot seem solve why entire result stored 1 variable. the loop seems iterate on 1 characters @ time, while behavior wanted 1 line @ time. what 1 character; short example below... 1 0 . 2 4 3 what i'd line return; can run other commands against each line.. 10.243.186.1 0.0.0.0 255.255.255.255 uh 0 0 0 eth0 10.243.188.1 0.0.0.0 255.255.255.255 uh 0 0 0 eth0 10.243.184.0 10.243.186.1 255.255.255.128 ug 0 0 0 eth0 here code below... def getnet(int): int = 'eth0' ####### testing cmd = ('route -n | grep ' + int) routes = subprocess.popen([cmd], shell=true, stdout=subprocess.pipe) routes, err = routes.communicate() line in routes: print line routes in case bytestring contains entire output shell command. for character in astring statement produces 1 cha...

android - Sending Intent from BroadcastReceiver class to currently running activity -

i have class extends broadcastreceiver . on receiving sms, pass information main activity class display text in box (append, if text present). public class smsreceiver extends broadcastreceiver { @override public void onreceive(context context, intent intent) { intent = new intent(context, mainactivity.class); i.putextra("updatedstring","hello"); context.startactivity(i); } } mainactivity.java public class mainactivity extends activity{ private textview results; @override public void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_main); bundle extras = getintent().getextras(); if(extras!=null){ results = (textview) findviewbyid(r.id.results); results.setvisibility(view.visible); results.append(extras.getstring("updatedstring")); } } i have 1 activity class ( ma...

How to reverse the string word by word in java when individual function is given for tokenization and reversing -

i have implemented code import java.util.arraylist; import java.util.list; public class client { string data; public string[] gettokens(string data) { list<string> arrl=new arraylist<string>(); (string tokens : data.split(" ")) { system.out.println(tokens); arrl.add(tokens); } string[] arr; arr=(string[]) arrl.toarray(new string[arrl.size()]); return arr; } public string reverseandappend(string[] data) { stringbuffer strbuf=new stringbuffer(); stringbuffer temp=new stringbuffer(); int i=0; for(i=0;i<data.length;i++) { strbuf.append(data[i]+" "); temp.append(strbuf.reverse().tostring()); ; } return temp.tostring(); } public static void main(string[] args) { client cl=new client(); string[] tokens=cl.gettokens("...

ajax - Node.js Express: Passing data from URL and session into served JavaScript file -

i've been building web-socket application in client opens link game instance, , server attempts connect client respective socket.io room on game transmit information. example, connecting '/game/abc' load game page , connect socket on page 'abc' room on server. the problem getting client javascript file emit game id , username of user connecting. want act in following way: client.js var socket = io(); socket.emit("newuser", username, gameid); i have managed accomplish passing both client.html , client.js page through express template renderer: server.js app.get(/^\/game\/([a-za-z0-9]*)$/, function(req, res){ var game = req.params[0]; var user = req.session.name; //gets username stored in session res.render("client.html", {username: user, gamename: game}); }); app.get(/game\/(.*)\/client.js/, function(req,res){ res.render("client.js", {username: req.session.name, gamename: req.params[0]}); }); the secon...

jasper reports - Page Break error new page -

print set of invoices in pdf , put page break $v{page_count}==16 , group break invoice number. ok, if invoice rows = 16 group total invoice print in new page. ideas? <group name="documento" isresetpagenumber="true" footerposition="forceatbottom"><groupexpression><numero fattura></groupexpression><groupfooter> <band height="230" splittype="immediate"><textfield><reportelement> totali fattura.....</band></groupfooter></group> <pageheader><band height="350" splittype="stretch"> <textfield><reportelement><textfield><reportelement>testata fattura</band></pageheader><detail><band height="16" splittype="stretch"><break> <reportelement><printwhenexpression><![cdata[$v{page‌​_count}==16]]></printwhenexpression> </reportelement></b...

java - org.openide.util.Lookup Cannot Find Any Classes Implementing -

sqlutils.java: import org.openide.util.lookup; import java.util.serviceloader; // doesn't work either public class sqlutils { public static dbdriver getdriver(string prefix) { for(dbdriver e : lookup.getdefault().lookupall(dbdriver.class)) { system.out.println(e.getprefix()); if(e.getprefix().equalsignorecase(prefix)) { return e; } } return null; } } mysqldriver.java: public class mysqldriver implements dbdriver { @override public string getprefix() { return "mysql"; } } dbdriver.java: import java.io.serializable; public interface dbdriver extends serializable { public string getprefix(); } main.java: public class main { public static void main(string[] args) { dbdriver d = sqlutils.getdriver("mysql"); } } this nothing when running it, cannot find classes implementing. program trying driver entered parameter sqlutils....

c# - Regex to replace &quot; with " only if it's not in another &quot; -

i'm converting an encoded xml document original format string myxml = oldxml.replace("&lt;", "<").replace("&amp;", "&") .replace("&gt;", ">") .replace("&quot;", "\"") .replace("&apos;", "'"); it works fine. want exclude &quot; if in &quot; . example: original xml //note title value <v:shape id="_x0000_i1025" title="a&quot; title &quot;b"> </v:shape> encoded xml &lt;v:shape id=&quot;_x0000_i1025&quot; title=&quot;a&quot; title &quot;b&quot;&gt; &lt;/v:shape&gt; recovered xml after replace //note title value <v:shape id="_x0000_i1025" title="a" title "b"...

Algorithm-finding kth next element in an array -

i couldn't solve question can please help? for i=1 i=n/2, if a[i]<=a[2i] , a[i]<=a[2i+1] called "bst" what's time complexity finding kth smallest element in bst n elements? there 2 methods: o(k ln(n)) time complexity. o(k ln(k)) time complexity + o(k) space complexity.

Elastic4s - how to express "matched_fields" -

i want implement following query in elastic4s. don't see way implement matched_fields clause in highlighter. help? { "query": { "multi_match": { "type": "most_fields", "query": "hello world", "fields": [ "text", "text.human" ] } }, "highlight": { "order": "score", "fields": { "text": { "matched_fields": [ "text", "text.human" ], "fragment_size": 100, "number_of_fragments": 10 } } } } a question simple answer. can't yet in elastic4s :) so, i've added it: https://github.com/sksamuel/elastic4s/commit/3f8a4e47ae603b7a3263bc3d31c27f2b6706cd8e this in next 1.5.x release , 1.6.0.

sorting - How to sort the cards in each hand from the card values first and then the suits in C? -

i want sort 5 cards each hand, sorting card value first (from ace king) , card suit (from hearts, diamonds, clubs , lastly spades), doesn't work. how able successfully? code: #include <stdio.h> #include <stdlib.h> #include <time.h> /* handy typedefs */ typedef unsigned char card; typedef unsigned char pairs; /* arrays names of things */ static char *suits[4] = {"hearts","diamonds","clubs","spades"}; static char *values[13]= {"ace","two","three","four","five","six","seven",/ "eight","nine","ten","jack","queen","king"}; static char *colour[2]= {"black","red"}; int compareface(const void* c1,const void *c2); int main() { card deck[52][24],*deckp; int s, c, a; for(s = 0; s < 4; s++)//for filling deck of 52 cards { for(c = 0; c < 13...

Php to JavaScript: make a "string statistic" out of a string -

i'm having more 8 millions records column "name" , have find way optimize search select * ... '%string%' . the problem can't use , index this. idea make "statistic" string : [char][number of chars][char][number of chars][char][number of chars]... where char char found in string , number of times it's in string. we can have strings this: name='electroperro' result='e01c01e02l01o02p01r03t01' nom='tanataka' result='t01a04k01n01t01' well got idea. i've made in php that: function string_stat($tab) { $ret=""; foreach ($tab $key=>$c) { $ret.=sprintf("%s%02d", $key, $c); } return $ret; } echo 'nom='.var_export($nom,true)."\n"; $stat=array(); ($i=0; $i<mb_strlen($nom); $i++) { $c=mb_substr($nom, $i, 1); if (!isset($stat[$c])) { $stat[$c]=0; } $stat[$c]++; } echo string_stat($stat)."\n"; i want have ...

c - Initialise thread pool -

as part of hw assignment, i'm implement thread pool in ansi c using pthreads. i'm having difficulty understanding how initialise thread pool. think idea initialise pool thread sleeps until job do, i'm not sure how implement this. create queue of jobs (this simple linked list), protected mutex. pair condition variable broadcast signalled when job added queue. threads can wait job code like: pthread_mutex_lock(&queue_lock); while (queue_is_empty) pthread_cond_wait(&queue_cond, &queue_lock); job = pop_from_queue(); pthread_mutex_unlock(&queue_lock);

java - What is the use of providing browser version in HtmlUnitDriver -

i trying run selenium webdriver in linux machine. tried use htmlunitdriver achieve this. i getting following error while executing jquery. typeerror: cannot find function addeventlistener in object [object htmldocument]. (http://localhost/xxx/js_lib/jquery2/jquery-2.1.0.min.js#2) the above exception occured when htmlunitdriver used without browser version below, htmlunitdriver driver = new htmlunitdriver(); driver.setjavascriptenabled(true); also junit test case getting failed following reason, org.openqa.selenium.nosuchelementexception: unable locate element id: abcde if pass browser version below, htmlunitdriver driver = new htmlunitdriver(browserversion.firefox_38); driver.setjavascriptenabled(true); the test case getting pass, exception thrown in console like, severe: job run failed unexpected runtimeexception: exception invoking window.getcomputedstyle() arguments [text, string] ======= exception start ======== exception class=[java.lang.illegalargumentexce...

algorithm - Detecting individual images in an array of images -

i'm building photographic film scanner. electronic hardware done have finish mechanical advance mechanism i'm done. i'm using line scan sensor it's 1 pixel width 2000 height. data stream sending pc on usb ftdi fifo bridge 1 byte values of pixels. scanner pull through entire strip of 36 frames end scanning entire strip. beginning i'm willing manually split them in photoshop implement in program me. i'm using c++ in vs. so, need find way pc detect near black strips in between images on film, isolate images , save them individual files. could give me advice this? that sounds pretty simple compared things you've implemented; calculate average pixel value per row, , call resulting signal s(n) ( n being row number). set threshold s(n) , setting below threshold 0 , above 1 assuming don't know exact pixel height of black bars , negatives, search periodicities in s(n) . describe in following total overkill, that's how roll: use fftw ...

c - Memory error in set resize -

here's structure of set i've written: struct state_set { struct state ***state_array; size_t *slot_sizes; size_t *slot_memory; }; here's initializer: struct state_set *state_set_init() { struct state_set *new_set = malloc(sizeof(struct state_set)); new_set->state_array = malloc(array_size * sizeof(struct state**)); new_set->slot_sizes = malloc(array_size * sizeof(size_t)); new_set->slot_memory = malloc(array_size * sizeof(size_t)); (int = 0; < array_size; i++) { new_set->slot_sizes[i] = 0; new_set->slot_memory[i] = initial_slot_size; } (int = 0; < array_size; i++) { new_set->state_array[i] = malloc(new_set->slot_memory[i] * sizeof(struct state*)); error_validate_pointer(new_set->state_array[i]); } return new_set; } and there's resizing function causes memory errors: void state_set_resize_slot(struct state_set *s...