Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Jun 13 17:43
    @rostrander_gitlab banned @habibatify_twitter
  • May 06 21:25
    @MadLittleMods banned @amanmahendra00_gitlab
  • Apr 30 15:20
    @MadLittleMods banned @Baranov1D_twitter
  • Apr 27 05:45
    @MadLittleMods banned @zhonghuacx
  • Feb 19 00:49
    @MadLittleMods banned @Whats-In-My-Vape_gitlab
  • Oct 13 2018 17:05
    @InternetUnexplorer banned @akhilreddy4245
  • Aug 20 2018 13:56
    @InternetUnexplorer banned @JMP2DIS
  • Jun 26 2018 09:23
    @MadLittleMods banned @chinedu69931716_twitter
  • Jun 16 2018 16:41
    @InternetUnexplorer banned @mewovi21_twitter
  • Jun 08 2018 02:57
    @MadLittleMods banned @VPB_COM_twitter
  • Jun 05 2018 23:12
    @MadLittleMods banned @LWSS
  • Jun 04 2018 17:35
    @MadLittleMods banned @Dreamboy6668_twitter
  • Jun 04 2018 17:34
    @MadLittleMods banned @javaaltu1_twitter
  • Jun 04 2018 17:33
    @MadLittleMods banned @alam110
  • Jun 04 2018 17:33
    @MadLittleMods banned @MixedVideo_twitter
  • Jun 04 2018 17:32
    @MadLittleMods banned @Hakmabhai1_twitter
  • Jun 04 2018 17:32
    @MadLittleMods banned @raza_shahjad_twitter
  • Jun 04 2018 17:32
    @MadLittleMods banned @simarjeetsohna_twitter
  • Jun 04 2018 17:32
    @MadLittleMods banned @malikbila5_twitter
  • Jun 04 2018 17:32
    @MadLittleMods banned @AmitMoarya967_twitter
Yaroslav
@YVeselovskyi
I tried this one, but maybe you have better idea?
Roger Ostrander
@rostrander_gitlab
@AnnieAdnan80_twitter This is a general chat channel for software developers, so while it's possible someone's used Mixer and can help you, it sounds like you're looking for a more Mixer-focused channel.
@YVeselovskyi Don't keep asking your question - if someone's willing to help, they'll help. Additionally, it's not really cool to ask for solutions for job interview problems here. Help, sure, but not just a straight-up answer.
Yaroslav
@YVeselovskyi
@rostrander_gitlab okay :)
Annie
@AnnieAdnan80_twitter
Why we can't do like people who can help us?
I prefer to find solutions of my constrains than to ask for someone to think and do things for me. I called that freedom from harrasing other people who are not part of their products problems. But if deployment or flighting for development that will be great for anyone including me.
Roger Ostrander
@rostrander_gitlab
@AnnieAdnan80_twitter I'm just saying that this probably isn't the best place to ask. If someone is willing to help, they will, but there are probably better resources. If something's wrong with your car, for example, who do you ask for help? Random people on the street might know, but going to a mechanic is a better idea.
Josebuendia
@Josebuendia
What's the difference between class and ID? What do they both do?
Ambika Kumar
@ambikarajbadal

@ambikarajbadal
Hey All,

I want to insert <td> on a specific index according to the header in the react-bootstrap table. So, how can I achieve it. Please help me.
I know it's a very basic question but I'm newbie.

Julian Gonggrijp
@jgonggrijp
@ambikarajbadal basic questions are fine! Your question is not very clear, though. Perhaps put the code you already have in a Gist. And what do you mean by "the header"?
harish
@patelcoding_gitlab
Hi any idea when and where people gone meet up ? I am new on coding too
Ambika Kumar
@ambikarajbadal

@jgonggrijp Thanks for the response.
Here header means <th> tag. My question is that I have a react-bootstrap table and I created seven column where each column header(<th>) name is the dates of the one week. Now I have an array of data with dates and I want to insert the data into that specific column which header name is matching with the date of data.

Thanks

Julian Gonggrijp
@jgonggrijp
@ambikarajbadal Alright, that's pretty clear. So what did you try and how did you get stuck?
testmyusernamebaby
@testmyusernamebaby

At first I apologize for my long question but I am forced to explain the problem
i write a method to conditional assign value to variable like this

function conditionalAssign($variable, $value, $condition){
if($condition) $variable = $value;

The problem is that the value is sometimes the result of function call so i need a way that i call it just in case that condition is true (FLAG) without check if-else in variable before call the function

Roger Ostrander
@rostrander_gitlab
@testmyusernamebaby If this isn't for an assignment or something, then there's not really a reason to write a function like that. It'll be more straightforward to just do if(whatever) $variable = true or whatever it is you want to use. Programmers are used to if statements so seeing conditionalAssign all over the place isn't going to be intuitive.
testmyusernamebaby
@testmyusernamebaby
@rostrander_gitlab The problem is much bigger than this i simplified it
the idea that i need fast way without if-else every property and in some times value is from function call so i need to excute function after check that condition is true not before in this normal way the function must be excuted to get parameter value
Ex:
$ob->conditionalAssign($a, fun(), $a->flag)->conditionalAssign($b, 'b', $b->flag);
Roger Ostrander
@rostrander_gitlab
@testmyusernamebaby I don't think I'm fully understanding what you're trying to do (even given the example). It sounds like you're trying to avoid using if-else, but there's no reason to do that; it's a well-understood part of the language. It also sounds like sometimes you want to call a function and sometimes you don't, in which case you can do:
if ($a->flag) $ob->thing1 = fun();
if ($b->flag) $ob->thing2 = 'b';
testmyusernamebaby
@testmyusernamebaby

@rostrander_gitlab
i am making template engine class, i have conditional variables in it so see this Ex:

$template->conditionalAssign('var_name', $value, $test->value == 'ok')
                    ->conditionalAssign('var_name2', $value, $test2->value == '2');

for me it's not clean way to do it in your way see the difference

if ($test->value == 'ok' ) $template->assign('var_name',$value)
if ($test2->value == '2' ) $template->assign('var_name2',$value)
Roger Ostrander
@rostrander_gitlab
@testmyusernamebaby Ah, I think I'm following, you're looking to chain assignments, in which case:
if ($test->value == 'ok' ) {
    $something = $template->assign('var_name',$value);
    if ($test2->value == '2') {
        $template->assign('var_name2', $value);
    }
}
Additionally, as an aside, if this is for something you intend to put in production, you're almost certainly better off using an existing templating engine. Rolling your own in production tends to be a ton of work and is hard to maintain for anyone but you.
That said, if you're doing this to learn how to do template engines, then have fun! :)
testmyusernamebaby
@testmyusernamebaby

yeaaaaaaaah chain assignments it's better for me ( i think its cleaner way )
the problem that i need a way to use something like call_user_func to execute function call if it a function in this case
Ex

conditionalAssign('var_name', func($test), $test->value == 'ok')

so func($test) executed after check the condition

Roger Ostrander
@rostrander_gitlab
@testmyusernamebaby It's clearer to you, but keep in mind that it took an entire page of explanation for you to explain to me (a fellow programmer who also knows PHP) what the conditionalAssign function was even supposed to do, and even now I'm not entirely sure of it. Again, if you're doing this for learning, that's no big deal. But if it's going in production, you'll want to stick with the familiar :)
testmyusernamebaby
@testmyusernamebaby
@rostrander_gitlab the idea of not using existing templating engine that i need custom engine to my project just small replacements i dont need huge engines
Roger Ostrander
@rostrander_gitlab
@testmyusernamebaby I haven't done much in PHP templating beyond what PHP itself can do so I can't offer you advice on more lightweight engines, but they probably exist. I don't mean to sound like a downer here, it's tons of fun learning how to do this, but as someone who has (A) done this, (B) had to maintain other people's code who have done this, and (C) have had to maintain my own code where I've done this but it's been long enough that I've forgotten what on earth I was thinking, I really wish I'd stuck with something with documentation and a viable community.
testmyusernamebaby
@testmyusernamebaby
@rostrander_gitlab anyway thank you for your response i think i found the solution
Roger Ostrander
@rostrander_gitlab
No problem, and good luck with your work :)
testmyusernamebaby
@testmyusernamebaby
@rostrander_gitlab thanks sir :)
ganeshsaanap
@ganeshsaanap
Sir using hex editor where can we write hex or binary or decimal
Julian Gonggrijp
@jgonggrijp
With a hex editor, you can do it everywhere! 😄
rkforevers
@rkforevers
Hi,
We are using ACTIVITI 7.
We have process definition such that it contains the timers(boundary event).
After creating the instances for such processes and performing some transition timer is activated (we are giving timer due date say it will execute after one day etc.).
Our usecase is to update the due date of timer in following ways:
1) Either prepone or postpone the timer due date with new one.
2) By adding time to the the existing due date and then update the new due date for the timer.
3) This operation may be for single timer and for bulk timers as well.
We are using the
List<Job> job =  managementService.createTimerJobQuery().executionId(execution.getId()).timers().list(); 

to get the existing list of timers, but it seems it is deprecated.
So can you please recommend some way so we can get the existing due date and update the new timer due date.
Ambika Kumar
@ambikarajbadal
@jgonggrijp Actually, I'm not able to associate the columns with headers.
Ambika Kumar
@ambikarajbadal
in the react-bootstrap table
lightningudemy
@lightningudemy

Good afternoon all, I am seeking information on where I went wrong with my code. I am receiving an error code stating the public key could not be found.

Here is my backend code:

import {fetch} from 'wix-fetch';  
import {wixData} from 'wix-data';


export function postLoyalty() {
 let options ={
 "headers": {        
 "X-Public": "pk_live_ba43e74df464cbf521dd07ee20443ff754c3afc11adc16df2594facb2147cd76"
        }
  }
 const url = 'https://whisqr.com/api/v1.2/user/customer/';
 const key = '<pk_live_ba43e74df464cbf521dd07ee20443ff754c3afc11adc16df2594facb2147cd76>';
     console.log("Url: ");

 return fetch(url, {method: 'post'})
    .then(response => {
 return response.json();
    })
    .then((data) => {
      console.log(data);
 return data;
    });
}

Here is my page code

import {postLoyalty} from 'backend/Loyalty.jsw';
import {wixData} from 'wix-data';
import wixLocation from "wix-location";
import {myFunction} from 'public/core.js';
import wixUsers from 'wix-users';


$w.onReady(function () {
 let publickey = 'pk_live_ba43e74df464cbf521dd07ee20443ff754c3afc11adc16df2594facb2147cd76';
    myFunction(publickey)
    .then( (response) => {
        console.log(response); //your base64 encoded string
    })});

export function page1_viewportEnter(event) {
 //Add your code for this event here: 
 let email = wixUsers.currentUser.getEmail();
postLoyalty(email)
        .then(LoyaltyInfo => {
            console.log(LoyaltyInfo)
            $w("#text1").text = LoyaltyInfo.Results.Value;
        })
}

I know this is a lot but I am at my wits end on how to deal with this. Any and all feedback is greatly appreciated!

dimtabu
@taburetkin
in first of all
where exactly you got an error you are talking about
lightningudemy
@lightningudemy
@taburetkin The error is coming from the backend code I assume. It is stating there is no public key which I have in the header. This same key is also added as "const key = '<pk_live_.....>"
dimtabu
@taburetkin
your backend code example does not illustrate that you correctly pass your key in headers
check what exactly headers do you send
i suppose you should somehow/somewhere use that option variable
lightningudemy
@lightningudemy

@taburetkin This is what is shown on the external api's site

curl --location --request POST "https://whisqr.com/api/v1.2/user/customer" \
  --header "X-Public: pk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
  --header "X-Hash: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
  --header "Content-Type: application/json" \
  --data "{
    \"email\": \"doesnotexist@whisqr.com\",
    \"firstname\": \"testname\",
    \"password\": \"password\"
}"

I would like to add this functionality to my Wix.com site using the Corvid/Wix-Code

dimtabu
@taburetkin
i think you forget to include your headers in your request
lightningudemy
@lightningudemy
How would I go about adding the header to the request? I am very new to developing and would love to get this figured out.
dimtabu
@taburetkin
import {fetch} from 'wix-fetch';
you are using some 3d party fetch method which, i believe, sends the request.
and you are using it with {method: 'post'} options. and i believe you should pass correct options to it.
follow the wix-fetch documentation because i am not familiar with it
lightningudemy
@lightningudemy
@taburetkin Ok I will look further into the wix fetch method, thank you so much for your assistance!
lightningudemy
@lightningudemy
@taburetkin Still no luck. According to Wix, the fetch is being used correctly. I just can't get around the public key not being found
dimtabu
@taburetkin
did you pass headers in fetch options?
in your example above you didnt
Julian Gonggrijp
@jgonggrijp

@ambikarajbadal :point_up: October 15, 2019 11:36 AM

@jgonggrijp Actually, I'm not able to associate the columns with headers.

So, what did you try to do that didn't work? Show us a few lines of code. Or if you have a lot of code, put it in a Gist.

testmyusernamebaby
@testmyusernamebaby

does laravel api controller always return JSON in normal return

return $whatever

???
i saw some people force the return to JSON so i'm curious about that.

sebbu2
@sebbu2
curl url | jq for pretty printing :D