mardi 26 octobre 2021

How to programmatically digital sign pdf documents using ASP .Net Core MVC?

I am looking for a code or any link from which I can be able to implement digital sign pdf using ASP .Net Core MVC. Anyone, please share the link or source code with me.

Thanks!




Passing List String from C# to Javasvript

I am currently trying to check if a value of a string variable is "Apple". Now I need to pass a list of fruits to javascript from C#.

C# Code

List<String> fruits = new List<String>{"Apple","Mango","Orange"}

JavaScript Code

$(document).on('click','#dvAppContent input:checkbox[id*=chkfunction]', function () {
   ToggleApplication(this);
});

function ToggleApplication(currentFunction) {
   var fruitName = $(currentFunction).closest('ui').parent('label').text().trim();    
   If(fruitName == "Apple")
   {
     return true;
   }       
}



How to save website for offline in flutter

I am having some trouble saving the website inside the flutter app. I have tried using the cache method and savewebarchive method for the inappwebview. The issue with the method is that it is not saving the full content of the website. It is only saving HTML and CSS files.

I want to save the whole website with all the content like HTML, CSS, js, font files, Images and store it inside the flutter app. I have gone through a few plugins but none of them were helpful.

I am looking for the same functionality as httrack.

Any right direction would be appriciated.




Flutter web nested routing

I have a flutter app as shown below with routes "LoginScreen, MainScreen, RegisterScreen"

class MyApp extends StatefulWidget {
@override
_MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
return MaterialApp(
     debugShowCheckedModeBanner: false,
     title: '........',
     theme: ThemeData(
       primaryColor: Color(0xff810000),
     ),
     navigatorKey: mainNav,
     home: WelcomeScreen(),
     initialRoute: '/',
     routes: {
       LoginScreen.routeName: (context) => LoginScreen(),
       MainScreen.routeName: (context) => MainScreen(),  
       RegisterScreen.routename: (context) => RegisterScreen()




     },
     
   ),
 );
}
}

Then in my MainScreen i have a column of widgets with one them being a Navigator widget to create a nested navigation in the MainScreen

child: Column(
                children: <Widget>[
                  Header(),
                  SizedBox(
                    height: 50,
                  ),
                  Expanded(
                    child: Navigator(
                      key: mainScreenNav,
                      initialRoute: 'u/main',
                      onGenerateRoute: (RouteSettings settings) {
                        WidgetBuilder builder;
                        switch (settings.name) {
                          case 'u/nestedA':
                            {
                              builder = (BuildContext context) =>
                                  ScreenA();

                              break;
                            }
                          case 'u/nestedB':
                            {
                              
                              builder =
                                  (BuildContext context) => ScreenB();
                              break;
                            }
                          case 'u/nestedC':
                            {
                              builder = (BuildContext context) =>
                                  ScreenC();
                              break;
                            }
                          default:
                            {
                              builder =
                                  (BuildContext context) => UnknownScreen();
                            }
                        }

                        return MaterialPageRoute(
                          settings: settings,
                          builder: builder,
                        );
                      },
                    ),
                  )
                ],
              )

From my side bar i navigate to a different screen like this mainScreenNav.currentState!.pushReplacementNamed('u/nestedA'); and my MainScreen nested navigator is updated accordingly. My Question is how can i update the url bar of my browser with the nested navigator's route name, i.e 'u/nestedA' just as it is update when i navigate to LoginScreen or RegisterScreen.




is there a way to fix broken emojis on windows 7 chrome

is there a way to fix webpage Unicode broken emojis on windows 7 chrome

enter image description here




How to use my hp Chromebook 14 to do PHP programming, JAVASCRIPT?

Can you help me please, because I have done everything and I did not find any solution.

Well here it is, to start I'm new to Chromebook, and this is my first Chromebook that I have, now please I would like to program in PHP, JAVASCRIPT and I installed xampp for linux in my Chromebook 14, then I followed a lot of tutorials and still nothing and still nothing, I don't even have access to the htdocs files to put my coding files and even create files in this folder. After installing xampp in my ChromeOs I can only access a custom url it gives me like: http://penguin.linux.test/ or connect from an ip address like: http://100.115.92.202. So please, what should I do in this case please? Is there a way to solve this in ChromeOs or to install Xampp correctly to program in PHP and MySQL? Or do I have to change my software from ChromeOs to Ubuntu?

Please help me? I don't know what to do 😔




My page is opening a new tab and I don't know why

I have a webpage that have to download an XLS when the input dates are correct, but if they are not correct, it has to show a message and stopped the dowload process.

All works fine, and I advice the user when the dates are incorrect, but it opens a new tab everytime I click on the button. If the dates are correct, it opens a new tab, but it is closed when the XLS is downloaded, if it is not correct, it advices the user, but it opens the new tab and doesn't close it. How can I fix it and don't open a new tab?

I put my code below:

HTML:

        <div class="botonera">
            <a4j:commandLink id="regimenConcertadoLink"
                styleClass="botonAplicacionTXT"
                action="#{descargaInformesBean.validarInformeRegimenConcertado()}"
                oncomplete="if(#{descargaInformesBean.informeRegimenConcertadoValido}){#{rich:element('descargaInforme')}.onclick();}"
                status="waitStatus">
                <h:outputText value="Descargar Informe" />
                <h:graphicImage value="/img/ico_descargar.gif"
                    alt="Descargar Informe"
                    title="Descargar Informe" />
                <f:param name="requiredValidator"
                    value="requiredValidator" />
            </a4j:commandLink>
            <h:commandLink id="descargaInforme"
                styleClass="botonAplicacionTXT" target="_blank"
                action="#{descargaInformesBean.descargarInformeIngresos()}">
            </h:commandLink>
        </div>

JAVA:

 public void descargarInformeIngresos() throws ServiceException, IOException {        
    if ((filtroFechaDesde != null && filtroFechaHasta != null) || (filtroFechaIngresoDesde != null && filtroFechaIngresoHasta != null)) {
        //DOXMLSTUFF 
    }else {
        AtlasFacesUtils.addErrorMessageFromBundle("error.fecha.vacia");
    }
}

As you see in the code, if both of the dates are null, I don't do anything and show a message to advice the user, this works fine, but still opens a new tab and I don't want to do that

Thanks!